-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (40 loc) · 1.01 KB
/
ci.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
name: CI
on:
push:
branches:
- 'main'
pull_request:
branches:
- 'main'
- 'feature/**'
jobs:
ci:
name: Run CI
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ '1.21' ]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: Determine Go cache paths
id: golang-path
run: |
echo "build=$(go env GOCACHE)" >>"$GITHUB_OUTPUT"
echo "module=$(go env GOMODCACHE)" >>"$GITHUB_OUTPUT"
shell: bash
- name: Setup Go cache
uses: actions/cache@v3
with:
path: |
${{ steps.golang-path.outputs.build }}
${{ steps.golang-path.outputs.module }}
key: ${{ runner.os }}-golang-${{ hashFiles('**/go.sum', 'Makefile') }}
restore-keys: |
${{ runner.os }}-golang-
- name: Run tests
run: make ci