Yeet those builds out!
1name: Go
2
3on:
4 push:
5 branches: ["main"]
6 pull_request:
7 branches: ["main"]
8
9permissions:
10 contents: read
11 actions: write
12
13jobs:
14 go_tests:
15 #runs-on: alrest-techarohq
16 runs-on: ubuntu-latest
17 steps:
18 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
19 with:
20 persist-credentials: false
21 fetch-tags: true
22
23 - name: build essential
24 run: |
25 sudo apt-get update
26 sudo apt-get install -y build-essential
27
28 - name: Set up Homebrew
29 uses: Homebrew/actions/setup-homebrew@8bcbfa880644de056b8e6bb1c583cb2f4362c6bb
30
31 - name: Setup Homebrew cellar cache
32 uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
33 with:
34 path: |
35 /home/linuxbrew/.linuxbrew/Cellar
36 /home/linuxbrew/.linuxbrew/bin
37 /home/linuxbrew/.linuxbrew/etc
38 /home/linuxbrew/.linuxbrew/include
39 /home/linuxbrew/.linuxbrew/lib
40 /home/linuxbrew/.linuxbrew/opt
41 /home/linuxbrew/.linuxbrew/sbin
42 /home/linuxbrew/.linuxbrew/share
43 /home/linuxbrew/.linuxbrew/var
44 key: ${{ runner.os }}-go-homebrew-cellar-${{ hashFiles('go.sum') }}
45 restore-keys: |
46 ${{ runner.os }}-go-homebrew-cellar-
47
48 - name: Install Brew dependencies
49 run: |
50 brew bundle
51
52 - name: Setup Golang caches
53 uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
54 with:
55 path: |
56 ~/.cache/go-build
57 ~/go/pkg/mod
58 key: ${{ runner.os }}-golang-${{ hashFiles('**/go.sum') }}
59 restore-keys: |
60 ${{ runner.os }}-golang-
61
62 - name: Build
63 run: make build
64
65 - name: Test
66 run: make test
67
68 - uses: dominikh/staticcheck-action@fe1dd0c3658873b46f8c9bb3291096a617310ca6 # v1.3.1
69 with:
70 version: "latest"