2021-02-18 20:38:32 +00:00
|
|
|
name: Lint, Test, Build
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags-ignore:
|
|
|
|
- 'v*'
|
|
|
|
branches:
|
|
|
|
- "**"
|
|
|
|
pull_request:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
lintTestBuild:
|
|
|
|
name: Lint, Test, Build
|
2021-04-13 22:47:26 +00:00
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2022-08-08 19:01:18 +00:00
|
|
|
go: [ '1.18', '1.19' ]
|
2021-02-18 20:38:32 +00:00
|
|
|
steps:
|
2021-04-13 22:38:36 +00:00
|
|
|
-
|
|
|
|
name: Checkout
|
2021-02-18 20:38:32 +00:00
|
|
|
uses: actions/checkout@v2
|
2021-04-13 22:38:36 +00:00
|
|
|
-
|
|
|
|
name: Setup Go
|
2021-02-18 20:38:32 +00:00
|
|
|
uses: actions/setup-go@v2
|
|
|
|
with:
|
2021-04-13 22:47:26 +00:00
|
|
|
go-version: ${{ matrix.go }}
|
2021-04-13 22:38:36 +00:00
|
|
|
-
|
|
|
|
name: Install Deps
|
2021-02-18 21:25:27 +00:00
|
|
|
id: install-deps
|
|
|
|
run: sudo apt-get -y install libpcsclite-dev
|
2021-04-13 22:38:36 +00:00
|
|
|
-
|
|
|
|
name: golangci-lint
|
|
|
|
uses: golangci/golangci-lint-action@v2
|
|
|
|
with:
|
2022-08-11 04:45:10 +00:00
|
|
|
version: ${{ secrets.GOLANGCI_LINT_VERSION }}
|
2021-04-13 22:42:54 +00:00
|
|
|
args: --timeout=30m
|
2021-04-13 22:38:36 +00:00
|
|
|
-
|
|
|
|
name: Test, Build
|
|
|
|
id: lint_test_build
|
|
|
|
run: V=1 make ci
|
|
|
|
-
|
|
|
|
name: Codecov
|
2022-08-08 19:01:18 +00:00
|
|
|
if: matrix.go == '1.19'
|
2022-04-11 21:14:02 +00:00
|
|
|
uses: codecov/codecov-action@v2
|
2021-02-18 20:38:32 +00:00
|
|
|
with:
|
2022-04-11 21:21:14 +00:00
|
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|
2022-04-11 21:14:02 +00:00
|
|
|
files: ./coverage.out # optional
|
2021-02-18 20:38:32 +00:00
|
|
|
name: codecov-umbrella # optional
|
|
|
|
fail_ci_if_error: true # optional (default = false)
|