-
-
Notifications
You must be signed in to change notification settings - Fork 138
65 lines (52 loc) · 1.45 KB
/
test.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Go Unit Test
on:
push:
branches: [ master ]
pull_request:
permissions:
contents: read
jobs:
test-and-lint:
name: Build
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version: 'stable'
cache: true
- name: Test lib ssh
run: go test -v -cover ./...
working-directory: crypto/ssh
- name: Test sshpiper
run: go test -v -race -cover -tags full ./...
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
args: --timeout=60m -E gofmt --verbose --print-resources-usage --build-tags full
env:
GOGC: "10"
# test go releaser
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Setup Snap
run: |
set -e
sudo snap install snapcraft --classic --revision 11040
# https://github.com/goreleaser/goreleaser/pull/2117
mkdir -p $HOME/.cache/snapcraft/download
mkdir -p $HOME/.cache/snapcraft/stage-packages
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: latest
args: release --snapshot --clean
env:
SKIP_PUSH: "true"