Skip to content

Commit

Permalink
Add test job
Browse files Browse the repository at this point in the history
Signed-off-by: Piotr Piotrowski <piotr@synadia.com>
  • Loading branch information
piotrpio committed Apr 29, 2024
1 parent a8d7a8f commit 489b24e
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ jobs:
uses: actions/setup-go@v5
with:
go-version: 1.22
cache: false

- name: Install deps
shell: bash --noprofile --norc -x -eo pipefail {0}
Expand All @@ -30,3 +29,32 @@ jobs:
GOFLAGS="-mod=mod -modfile=go_test.mod" staticcheck ./...
find . -type f -name "*.go" | xargs misspell -error -locale US
golangci-lint run --timeout 5m0s ./jetstream/...
test:
runs-on: ubuntu-latest

strategy:
matrix:
go: [ "1.21", "1.22" ]
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: Install deps
shell: bash --noprofile --norc -x -eo pipefail {0}
run: |
go install github.com/mattn/goveralls@latest
go install github.com/wadey/gocovmerge@latest
- name: Test and coverage
run: |
go test -modfile=go_test.mod -v -run=TestNoRace -p=1 ./... --failfast -vet=off
if [ "${{ matrix.go }}" = "1.21" ]; then
./scripts/cov.sh CI
elif [ "${{ matrix.go }}" = "1.22" ]; then
go test -modfile=go_test.mod -race -v -p=1 ./... --failfast -vet=off -tags=internal_testing
fi

0 comments on commit 489b24e

Please sign in to comment.