Skip to content

Commit

Permalink
build: Update GitHub workflows
Browse files Browse the repository at this point in the history
- 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>
  • Loading branch information
pjbgf committed Dec 5, 2022
1 parent 7ab80d7 commit 007675e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 9 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
on: [push, pull_request]
name: Test
permissions: {}
jobs:
test:
strategy:
matrix:
go-version: [1.14.x, 1.15.x, 1.16.x]
go-version: [1.18.x,1.19.x]
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go
uses: actions/setup-go@v1
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Test
run: go test ./...
run: make test
11 changes: 6 additions & 5 deletions .github/workflows/test_js.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
on: [push, pull_request]
name: Test
name: Test JS
permissions: {}
jobs:
test:
strategy:
matrix:
go-version: [1.14.x, 1.15.x, 1.16.x]
go-version: [1.18.x,1.19.x]
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v1
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}

- name: Install wasmbrowsertest
run: |
go get github.com/agnivade/wasmbrowsertest
go install github.com/agnivade/wasmbrowsertest@latest
mv $HOME/go/bin/wasmbrowsertest $HOME/go/bin/go_js_wasm_exec
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Test
run: go test -exec="$HOME/go/bin/go_js_wasm_exec" ./...
Expand Down
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Go parameters
GOCMD = go
GOTEST = $(GOCMD) test

.PHONY: test
test:
$(GOTEST) -race ./...

test-coverage:
echo "" > $(COVERAGE_REPORT); \
$(GOTEST) -coverprofile=$(COVERAGE_REPORT) -coverpkg=./... -covermode=$(COVERAGE_MODE) ./...

0 comments on commit 007675e

Please sign in to comment.