Skip to content

Commit 007675e

Browse files
committed
build: Update GitHub workflows
- Remove unecessary token permissions in CI. - Bump Action versions to latest. - Bump Go version to match go-git repository. Signed-off-by: Paulo Gomes <pjbgf@linux.com>
1 parent 7ab80d7 commit 007675e

File tree

3 files changed

+22
-9
lines changed

3 files changed

+22
-9
lines changed

.github/workflows/test.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
on: [push, pull_request]
22
name: Test
3+
permissions: {}
34
jobs:
45
test:
56
strategy:
67
matrix:
7-
go-version: [1.14.x, 1.15.x, 1.16.x]
8+
go-version: [1.18.x,1.19.x]
89
platform: [ubuntu-latest, macos-latest, windows-latest]
910
runs-on: ${{ matrix.platform }}
1011
steps:
1112
- name: Install Go
12-
uses: actions/setup-go@v1
13+
uses: actions/setup-go@v3
1314
with:
1415
go-version: ${{ matrix.go-version }}
1516
- name: Checkout code
16-
uses: actions/checkout@v2
17+
uses: actions/checkout@v3
1718
- name: Test
18-
run: go test ./...
19+
run: make test

.github/workflows/test_js.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
11
on: [push, pull_request]
2-
name: Test
2+
name: Test JS
3+
permissions: {}
34
jobs:
45
test:
56
strategy:
67
matrix:
7-
go-version: [1.14.x, 1.15.x, 1.16.x]
8+
go-version: [1.18.x,1.19.x]
89
runs-on: ubuntu-latest
910
steps:
1011
- name: Install Go
11-
uses: actions/setup-go@v1
12+
uses: actions/setup-go@v3
1213
with:
1314
go-version: ${{ matrix.go-version }}
1415

1516
- name: Install wasmbrowsertest
1617
run: |
17-
go get github.com/agnivade/wasmbrowsertest
18+
go install github.com/agnivade/wasmbrowsertest@latest
1819
mv $HOME/go/bin/wasmbrowsertest $HOME/go/bin/go_js_wasm_exec
1920
2021
- name: Checkout code
21-
uses: actions/checkout@v2
22+
uses: actions/checkout@v3
2223

2324
- name: Test
2425
run: go test -exec="$HOME/go/bin/go_js_wasm_exec" ./...

Makefile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Go parameters
2+
GOCMD = go
3+
GOTEST = $(GOCMD) test
4+
5+
.PHONY: test
6+
test:
7+
$(GOTEST) -race ./...
8+
9+
test-coverage:
10+
echo "" > $(COVERAGE_REPORT); \
11+
$(GOTEST) -coverprofile=$(COVERAGE_REPORT) -coverpkg=./... -covermode=$(COVERAGE_MODE) ./...

0 commit comments

Comments
 (0)