-
Notifications
You must be signed in to change notification settings - Fork 10
41 lines (41 loc) · 1.08 KB
/
test.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Tests
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
tests:
runs-on: ubuntu-20.04
strategy:
matrix:
goversion:
- 1.18
# TODO: enable stable, right now tests fails there, see
# https://github.com/snapcore/secboot/pull/259
# - stable
steps:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.goversion }}
- name: Install dependencies
run: |
sudo snap install core core18
sudo snap install --edge tpm2-simulator-chrisccoulson
- name: Checkout code
uses: actions/checkout@v3
- name: Cache Go dependencies
id: cache-go-modules
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Build
run: go build -v -mod=readonly ./...
- name: Test
run: go test -v -race -p 1 -mod=readonly ./... -args -use-mssim
- name: Go vet
run: go vet ./...