-
Notifications
You must be signed in to change notification settings - Fork 15
43 lines (43 loc) · 1.32 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
42
43
name: Tests
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
tests:
runs-on: ubuntu-20.04
env:
GOPATH: ${{ github.workspace }}
GO111MODULE: off
steps:
- name: Set up Go 1.18
uses: actions/setup-go@v2
with:
go-version: 1.18
- name: Checkout code
uses: actions/checkout@v2
with:
path: ./src/github.com/snapcore/secboot
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y sbsigntool
sudo snap install core core18
sudo snap install --edge tpm2-simulator-chrisccoulson
- name: Install govendor
run: go get -u github.com/kardianos/govendor
- name: Cache Go dependencies
id: cache-go-govendor
uses: actions/cache@v2
with:
path: ${{ github.workspace }}/.cache/govendor
key: go-govendor-{{ hashFiles('**/vendor.json') }}
- name: Get Go dependencies
run: cd ${{ github.workspace }}/src/github.com/snapcore/secboot && ${{ github.workspace }}/bin/govendor sync
- name: Build
run: go build -v github.com/snapcore/secboot/...
- name: Test
run: cd ${{ github.workspace }}/src/github.com/snapcore/secboot && ./run-tests --with-mssim
- name: Go vet
run: go vet github.com/snapcore/secboot/...