-
Notifications
You must be signed in to change notification settings - Fork 2
33 lines (25 loc) · 796 Bytes
/
Copy pathtest.yaml
File metadata and controls
33 lines (25 loc) · 796 Bytes
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
name: Test
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Install a swtpm
run: |
sudo apt-get update && sudo apt-get -y install swtpm swtpm-tools
- name: run swtpm
run: |
mkdir /tmp/myvtpm && /usr/share/swtpm/swtpm-create-user-config-files && swtpm_setup --tpmstate /tmp/myvtpm --tpm2 --create-ek-cert && swtpm socket --tpmstate dir=/tmp/myvtpm --tpm2 --server type=tcp,port=2321 --ctrl type=tcp,port=2322 --flags not-need-init,startup-clear &
- name: Check out code
uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: Run tests
run: go test -v ./...