| 1 |
name: test |
| 2 |
on: |
| 3 |
push: |
| 4 |
branches: |
| 5 |
- main |
| 6 |
pull_request: |
| 7 |
branches: |
| 8 |
- main |
| 9 |
|
| 10 |
jobs: |
| 11 |
test: |
| 12 |
strategy: |
| 13 |
matrix: |
| 14 |
os: [ubuntu-latest] |
| 15 |
go-version: [1.18.x, 1.19.x] |
| 16 |
runs-on: ${{ matrix.os }} |
| 17 |
steps: |
| 18 |
- name: Install Go |
| 19 |
uses: actions/setup-go@v2 |
| 20 |
with: |
| 21 |
go-version: ${{ matrix.go-version }} |
| 22 |
- name: Install libsofthsm2 |
| 23 |
run: sudo apt-get install -y libsofthsm2 |
| 24 |
- name: Install staticcheck |
| 25 |
run: go install honnef.co/go/tools/cmd/[email protected] |
| 26 |
- name: Checkout code |
| 27 |
uses: actions/checkout@v2 |
| 28 |
- name: Build |
| 29 |
run: go build ./... |
| 30 |
- name: Test |
| 31 |
run: go test ./... -require-libsofthsm2 |
| 32 |
- name: Vet |
| 33 |
run: go vet ./... |
| 34 |
- name: staticcheck |
| 35 |
run: staticcheck ./... |