-
Notifications
You must be signed in to change notification settings - Fork 1
64 lines (54 loc) · 1.37 KB
/
Copy pathci.yaml
File metadata and controls
64 lines (54 loc) · 1.37 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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
inputs:
run_mod_tests:
description: 'Run full mod build tests'
required: false
default: 'false'
type: boolean
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.23'
- name: Run linting
run: make lint
- name: Run unit tests
run: make test
- name: Build binary
run: make build
test-mods:
runs-on: ubuntu-latest
# Run on main branch, manual trigger with run_mod_tests=true, or if PR title contains [test-mods]
if: |
github.ref == 'refs/heads/main' ||
github.event.inputs.run_mod_tests == 'true'
needs: test
strategy:
fail-fast: false
matrix:
os: [ubuntu, fedora, alpine]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.23'
- name: Build binary
run: make build
- name: Run mod build tests for ${{ matrix.os }}
run: |
go test -tags=e2e -v -timeout=30m -run "TestModBuilds/${{ matrix.os }}" ./internal/e2e/...
env:
DOCKER_BUILDKIT: 1