Skip to content

Commit

Permalink
update github CI configuration
Browse files Browse the repository at this point in the history
Signed-off-by: p4u <pau@dabax.net>
  • Loading branch information
p4u committed Sep 13, 2023
1 parent 475a9be commit a2ea1d3
Showing 1 changed file with 21 additions and 14 deletions.
35 changes: 21 additions & 14 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,31 @@ jobs:
only-new-issues: true

test:
# matrix strategy from: https://github.com/mvdan/github-actions-golang/blob/master/.github/workflows/test.yml
strategy:
matrix:
go-version: [1.20.x]
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
runs-on: ubuntu-latest
env:
WEB3_URI: ${{ secrets.WEB3_URI }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v3
- name: Set up Go environment
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
cache: true
- name: Run go test
env:
WEB3_URI: ${{ secrets.WEB3_URI }}
run: go test -timeout=10m -race ./...
go-version: '1.20'
- name: Tidy go module
run: |
go mod tidy
if [[ $(git status --porcelain) ]]; then
git diff
echo
echo "go mod tidy made these changes, please run 'go mod tidy' and include those changes in a commit"
exit 1
fi
- name: Run Go test (and collect code coverage)
if: github.event_name == 'pull_request' # quicker, non-race test in case it's a PR or push to dev
run: go test ./...
- name: Run Go test -race
if: github.event_name == 'push'
run: go test -vet=off -timeout=15m -race ./... # note that -race can easily make the crypto stuff 10x slower

docker-release:
runs-on: ubuntu-latest
Expand Down

0 comments on commit a2ea1d3

Please sign in to comment.