-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (42 loc) · 1.04 KB
/
main.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
name: CI
on:
push:
branches: [main]
pull_request:
merge_group:
branches: ["**"]
permissions:
contents: read # for golangci-lint-action
jobs:
tests:
name: Run tests
strategy:
matrix:
os: [Ubuntu]
go-version: ["1.22.x"]
runs-on: ${{ matrix.os }}-latest
steps:
- uses: actions/checkout@v4
with:
lfs: true
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Install dependencies
run: |
go get ./...
go install github.com/jstemmer/go-junit-report@latest
- name: Build
run: go build -v ./...
- name: Run Tests
run: go test -v ./... | go-junit-report -set-exit-code > test-report.xml
- name: Test Summary
uses: test-summary/action@v2
with:
paths: "test-report.xml"
if: always()
- name: Lint
uses: golangci/golangci-lint-action@v4
with:
version: v1.58