n2k-reader can filter by source, embbed canboat database into n2k-rea… #32
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
branches: | |
- '*' | |
pull_request: | |
branches: | |
- '*' | |
workflow_dispatch: | |
env: | |
# run coverage and benchmarks only with the latest Go version | |
LATEST_GO_VERSION: 1.20 | |
name: Check and test | |
jobs: | |
test: | |
strategy: | |
matrix: | |
go-version: [ "1.19", "1.20" ] | |
platform: [ ubuntu-latest ] | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- name: Install Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Checkout code of this branch | |
uses: actions/checkout@v3 | |
- name: Execute Go lint, check, test | |
run: | | |
make download-canboat-pgns | |
make init | |
make check | |
go test -race --coverprofile=coverage.coverprofile --covermode=atomic ./... | |
- name: Upload coverage to Codecov | |
if: success() && matrix.go-version == env.LATEST_GO_VERSION && matrix.platform == 'ubuntu-latest' | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: coverage.coverprofile | |
flags: unittests | |
fail_ci_if_error: false |