Skip to content

Commit

Permalink
fix GitHub Actions workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
zephyrtronium committed Apr 7, 2020
1 parent 5ff2f27 commit 7b6e340
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,30 @@ jobs:
go env -w GOPATH=$HOME
go mod init CI
- name: Install the repository and dependencies
- name: Install the repository and dependencies (non-Windows)
run: go get -v -t github.com/$GITHUB_REPOSITORY@$GITHUB_SHA
if: runner.os != 'Windows'

- name: Check that subpackages build
- name: Install the repository and dependencies (Windows)
run: go get -v -t github.com/${env:GITHUB_REPOSITORY}@${env:GITHUB_SHA}
if: runner.os == 'Windows'

- name: Check that subpackages build (non-Windows)
run: go build -v -tags static_addons github.com/$GITHUB_REPOSITORY github.com/$GITHUB_REPOSITORY/coreext/... github.com/$GITHUB_REPOSITORY/cmd/... github.com/$GITHUB_REPOSITORY/testutils
if: runner.os != 'Windows'

- name: Check that subpackages build (Windows)
run: go build -v -tags static_addons github.com/${env:GITHUB_REPOSITORY} github.com/${env:GITHUB_REPOSITORY}/coreext/... github.com/${env:GITHUB_REPOSITORY}/cmd/... github.com/${env:GITHUB_REPOSITORY}/testutils
if: runner.os == 'Windows'

- name: Run tests
- name: Run tests (non-Windows)
run: |
go test github.com/$GITHUB_REPOSITORY/...
go test -race -count=3 github.com/$GITHUB_REPOSITORY/...
if: runner.os != 'Windows'

- name: Run tests (Windows)
run: |
go test github.com/${env:GITHUB_REPOSITORY}/...
go test -race -count=3 github.com/${env:GITHUB_REPOSITORY}/...
if: runner.os == 'Windows'

0 comments on commit 7b6e340

Please sign in to comment.