Skip to content

Commit 20b5cf6

Browse files
authored
Merge pull request #41 from Automattic/add/gha
Add GitHub Action to build and test
2 parents 1e0b8db + a6a9331 commit 20b5cf6

File tree

2 files changed

+26
-5
lines changed

2 files changed

+26
-5
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Build and Test
2+
3+
on:
4+
push:
5+
branches: [ "trunk" ]
6+
pull_request:
7+
branches: [ "trunk" ]
8+
9+
jobs:
10+
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v3
15+
16+
- name: Set up Go
17+
uses: actions/setup-go@v4
18+
with:
19+
go-version: '1.23'
20+
21+
- name: Test and Build
22+
run: make ci

Makefile

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
BINARY = go-search-replace
22
BUILDDIR = ./build
33

4-
all: vet fmt lint test build
4+
all: vet fmt test build
5+
6+
ci: clean vet test
57

68
build: clean
79
which gox > /dev/null || go get -u github.com/mitchellh/gox
@@ -14,14 +16,11 @@ vet:
1416
fmt:
1517
gofmt -s -l . | grep -v vendor | tee /dev/stderr
1618

17-
lint:
18-
golint ./... | grep -v vendor | tee /dev/stderr
19-
2019
test:
2120
go test -v ./...
2221
go test -bench .
2322

2423
clean:
2524
rm -rf ${BUILDDIR}
2625

27-
.PHONY: all clean vet fmt lint test build
26+
.PHONY: all ci clean vet fmt test build

0 commit comments

Comments
 (0)