-
Notifications
You must be signed in to change notification settings - Fork 1
61 lines (44 loc) · 1.38 KB
/
linux.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
name: Tests on Linux
on:
push:
pull_request:
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Download particular version of Go
run: curl -o go.tar.gz https://storage.googleapis.com/golang/go1.20.1.linux-amd64.tar.gz
- name: Digest of compiler
run: sha256sum go.tar.gz
- name: Install Go
run: sudo tar -C /usr/local -xzf go.tar.gz
- name: Install Go
run: sudo echo "/usr/local/go/bin" >> $GITHUB_PATH
- name: Verify dependencies
run: go mod verify
- name: Build
run: go build -v ./...
- name: Run go vet
run: go vet ./...
- name: Install staticcheck
run: GOBIN=/usr/local/bin/ go install honnef.co/go/tools/cmd/staticcheck@latest
- name: Run staticcheck
run: staticcheck ./...
- name: Run unit tests
run: go test -race -vet=off ./...
- name: Build command util
run: go build -asmflags -trimpath
- name: Install dependencies for command utility tests.
run: sudo apt update -y && sudo apt install -y ssh
- name: Run integration tests for command utility.
run: ./tests.sh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Digest of binary
run: sha256sum ./git-ring
- name: Upload binary
uses: actions/upload-artifact@v3
with:
name: git-ring
path: ./git-ring