-
Notifications
You must be signed in to change notification settings - Fork 29
36 lines (29 loc) · 933 Bytes
/
push.yml
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
name: gokrazy CI
on:
push:
pull_request:
jobs:
build:
name: build-and-test
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v3
- name: Set up Go 1.x
uses: actions/setup-go@v4
with:
# Run on the latest stable Go version, e.g. 1.23.0:
# Currently on Go 1.22 because of https://go.dev/issue/68928
go-version: '1.22'
id: go
- name: Ensure all files were formatted as per gofmt
run: |
[ "$(gofmt -l $(find . -name '*.go') 2>&1)" = "" ]
- name: Build and run tests
# TestRelativeParentDir verifies breakglass.authorized_keys
# is correctly included, and the gok CLI only creates that
# file when it finds SSH keys.
run: |
mkdir -p ~/.ssh && echo dummy > ~/.ssh/id_ed25519.pub
go install -mod=mod ./cmd/...
go test -mod=mod -v ./...