Repository navigation
75 lines (70 loc) · 2.13 KB
/
Copy pathci.yml
File metadata and controls
75 lines (70 loc) · 2.13 KB
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: CI
on:
push:
branches: [master]
pull_request:
permissions:
contents: read
jobs:
compatibility:
name: Go ${{ matrix.go-version }}
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ['1.26.0', '1.26.10']
steps:
- name: Checkout repo
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
- name: Install Go ${{ matrix.go-version }}
uses: jdx/mise-action@c2a87611a18de5b3828c5652fe268e992400cb5c # v4
with:
install_args: go@${{ matrix.go-version }}
- name: Cache Go
uses: ./.github/actions/go-cache
- name: Run tests
run: |
mise exec go@${{ matrix.go-version }} -- go version
mise exec go@${{ matrix.go-version }} -- mise test
quality:
name: Format and lint
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
- name: Install tools
uses: jdx/mise-action@c2a87611a18de5b3828c5652fe268e992400cb5c # v4
- name: Cache Go
uses: ./.github/actions/go-cache
- name: Check formatting
run: mise format --check
- name: Run linters
run: mise lint --check
unit:
name: Unit tests
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
- name: Install tools
uses: jdx/mise-action@c2a87611a18de5b3828c5652fe268e992400cb5c # v4
- name: Cache Go
uses: ./.github/actions/go-cache
- name: Show Go version
run: go version
- name: Run race tests
run: mise test --race
- name: Scan dependencies
run: mise vuln
e2e:
name: E2E tests
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout repo
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
- name: Install tools
uses: jdx/mise-action@c2a87611a18de5b3828c5652fe268e992400cb5c # v4
- name: Cache Go
uses: ./.github/actions/go-cache
- name: Run E2E tests
run: mise e2e