-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (38 loc) · 1.14 KB
/
macos.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
name: Tests on MacOS
on:
push:
pull_request:
jobs:
check:
runs-on: macOS-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.darwin-amd64.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: Run integration tests for command utility.
run: ./tests.sh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload binary
uses: actions/upload-artifact@v3
with:
name: git-ring
path: ./git-ring