-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (49 loc) · 1.24 KB
/
go.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
# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
name: Go
on:
push:
branches: [ "main" ]
pull_request:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
mise-env: ['oldstable', 'stable']
env:
MISE_ENV: ${{ matrix.mise-env }}
steps:
- uses: actions/checkout@v4
- uses: jdx/mise-action@v2
with:
cache_key_prefix: mise-v0-${{ matrix.mise-env }}
- name: Set up Go
uses: actions/setup-go@v5
- name: Verify Go version
run: go version
- name: Build
run: mise run build
- name: Test
run: mise run test
- name: Verify golden files
if: env.MISE_ENV == 'stable'
run: make diff-testdata
- name: Generate coverage
run: mise run coverage
- name: Upload to CodeCov
uses: codecov/codecov-action@v5
with:
files: ./cover.unsafe.out,./cover.safe.out
lint:
name: lint
runs-on: ubuntu-latest
env:
MISE_ENV: stable
steps:
- uses: actions/checkout@v4
- uses: jdx/mise-action@v2
with:
cache_key_prefix: mise-v0-stable
- name: lint
run: mise run lint