Skip to content

Commit

Permalink
Run test with coverage job separately
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan Mirić committed Oct 1, 2020
1 parent 9463302 commit 8edf3da
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions .github/workflows/all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,26 @@ jobs:
matrix:
go-version: [1.14.x, 1.15.x]
platform: [ubuntu-latest, windows-latest]
exclude:
# This environment is used in test-coverage.
- platform: ubuntu-latest
go-version: 1.15.x
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Run tests
run: |
go version
export GOMAXPROCS=2
go test -p 2 -race -timeout 800s ./...
test-coverage:
runs-on: ubuntu-latest
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
steps:
Expand All @@ -70,12 +89,11 @@ jobs:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
go-version: 1.15.x
- name: Run tests with code coverage
run: |
go version
export GOMAXPROCS=2
export PATH=$GOPATH/bin:$PATH
echo "mode: set" > coverage.txt
for pkg in $(go list ./... | grep -v vendor); do
list=$(go list -test -f '{{ join .Deps "\n"}}' $pkg | grep github.com/loadimpact/k6 | grep -v vendor || true)
Expand Down

0 comments on commit 8edf3da

Please sign in to comment.