-
Notifications
You must be signed in to change notification settings - Fork 1
93 lines (76 loc) · 2.32 KB
/
Copy pathci.yaml
File metadata and controls
93 lines (76 loc) · 2.32 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# Copyright (c) 2024-2025 Six After, Inc
#
# This source code is licensed under the Apache 2.0 License found in the
# LICENSE file in the root directory of this source tree.
# Ref: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
name: ci
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main
paths-ignore:
- 'CHANGELOG/**'
- 'CODEOWNERS'
- 'docs/**'
- 'LICENSE'
- '**/*.md'
# Declare default permissions as read only.
permissions: read-all
jobs:
ci:
permissions:
contents: read # Required for checking out the repo
pull-requests: read # Needed for reading PR details
checks: write # Needed for creating status checks
runs-on: ubuntu-latest
env:
flags: ""
steps:
- name: Preamble
run: |
echo github ref $GITHUB_REF
echo workflow $GITHUB_WORKFLOW
echo home $HOME
echo event name $GITHUB_EVENT_NAME
echo workspace $GITHUB_WORKSPACE
df -h
sudo DEBIAN_FRONTEND=noninteractive apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y software-properties-common ca-certificates gnupg-agent curl build-essential make
# Ref: https://github.com/actions/checkout
- name: Checkout Source
uses: actions/checkout@v5
with:
fetch-depth: 0
# Ref: https://github.com/actions/setup-go
- name: Install Go
uses: actions/setup-go@v6
with:
go-version-file: go.mod
# Ref: https://github.com/golangci/golangci-lint-action
- name: Lint
uses: golangci/golangci-lint-action@v9
with:
args: --timeout=30m --config=.golangci.yaml --issues-exit-code=0
- name: Test
run: |
make test
- name: Fuzz
run: |
make fuzz
- name: Cover
run: |
make cover
- name: Analyze
run: |
make analyze
# Ref: https://github.com/SonarSource/sonarqube-scan-action
- name: SonarQube Scan
uses: SonarSource/sonarqube-scan-action@v6
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
GITHUB_USER: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}