Skip to content

Commit

Permalink
test both stdlib and goccy
Browse files Browse the repository at this point in the history
  • Loading branch information
lestrrat committed Jan 24, 2021
1 parent 5f5648d commit 3e4587a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
json_backend: [ 'stdlib', 'goccy' ]
go: [ '1.15.x', '1.14.x' ]
name: Go ${{ matrix.go }} test
steps:
Expand Down Expand Up @@ -44,7 +45,7 @@ jobs:
run: sudo apt-get install -y --no-install-recommends jose
- run: make generate
- name: Test with coverage
run: make cover
run: make cover-${{ matrix.json_backend }}
- name: Upload code coverage to codecov
if: matrix.go == '1.15.x'
uses: codecov/codecov-action@v1
Expand Down
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,22 @@ test:
cd examples && go test -v -race && cd .. && go test -v -race ./...

cover:
$(MAKE) cover-stdlib

cover-stdlib:
cd examples && go test -v -race && cd .. && go test -v -race -coverpkg=./... -coverprofile=coverage.out.tmp ./...
@# This is NOT cheating. tools to generate code don't need to be
@# included in the final result
@cat coverage.out.tmp | grep -v "internal/cmd" > coverage.out
@rm coverage.out.tmp

cover-goccy:
cd examples && go test -v -tags jwx_goccy -race && cd .. && go test -v -tags jwx_goccy -race -coverpkg=./... -coverprofile=coverage.out.tmp ./...
@# This is NOT cheating. tools to generate code don't need to be
@# included in the final result
@cat coverage.out.tmp | grep -v "internal/cmd" > coverage.out
@rm coverage.out.tmp

smoke:
cd examples && go test -race && cd .. && go test -race -short ./...

Expand Down

0 comments on commit 3e4587a

Please sign in to comment.