-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (44 loc) · 1.12 KB
/
ci-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
name: CI Go
on:
pull_request:
paths:
- .github/workflows/ci-go.yml
- '**.go'
- '**/go.*'
- '**/Makefile'
run-name: CI Go by @${{ github.actor }} ${{ github.sha }}
jobs:
build-test:
runs-on: ubuntu-latest
container: golang:1.23.4
steps:
- name: setup
run: git config --global --add safe.directory $(pwd)
- uses: actions/checkout@v4
- name: build
run: make build
- name: tidy
run: make tidy
- name: test
run: make unit
resolve-go-modules:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Checkout Sources
uses: actions/checkout@v4
- id: set-matrix
run: ./.github/scripts/resolve-modules.sh
lint:
needs: resolve-go-modules
runs-on: ubuntu-latest
strategy:
matrix: ${{ fromJson(needs.resolve-go-modules.outputs.matrix) }}
steps:
- uses: actions/checkout@v4
- name: golangci-lint
uses: golangci/golangci-lint-action@v4
with:
version: v1.52.2
working-directory: ${{ matrix.workdir }}