-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (49 loc) · 1.26 KB
/
Copy pathmaster.yml
File metadata and controls
62 lines (49 loc) · 1.26 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
name: Master CI
on:
push:
branches: ["master"]
pull_request:
branches: ["master"]
jobs:
build-scan:
name: SonarCloud Scan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up Go 1.26.3
uses: actions/setup-go@v6
with:
go-version: '1.26.3'
- name: Build
run: go build -v ./...
- name: Lint
uses: golangci/golangci-lint-action@v9
with:
version: v2.12.2
- name: Test
run: go test -p 1 -v ./... -coverprofile="coverage.out"
- name: SonarCloud Scan
uses: sonarsource/sonarqube-scan-action@v8.1.0
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
if: env.SONAR_TOKEN != ''
build-test:
name: Build & Test - Go ${{ matrix.go-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
go-version: ['1.25.10', '1.26.3']
steps:
- name: Git checkout
uses: actions/checkout@v6
- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@v6
with:
go-version: ${{ matrix.go-version }}
- name: Build
run: go build -v ./...
- name: Test
run: go test -p 1 -v ./...