-
Notifications
You must be signed in to change notification settings - Fork 17
30 lines (29 loc) · 1.02 KB
/
golang.yaml
File metadata and controls
30 lines (29 loc) · 1.02 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
on:
push:
pull_request: #sonar refuses to display branch analysis results on Free plan even for OSS
types: [opened, synchronize, reopened]
jobs:
golang:
runs-on: ubuntu-latest # we execute everything except make in docker anyway
name: GoLang Basics
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of Sonar scan
- name: Dep
run: make dep
- name: Lint
run: make lint
- name: Coverage Setup
run: mkdir -p .coverage/unit
- name: Unit Tests
run: make test
- name: Integration Tests
run: make integration
- name: SonarQube Scan
uses: SonarSource/sonarqube-scan-action@v7
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
# run on PRs and once we merge to main, as we need baseline runs for main in Sonar
if: ${{ ( github.event_name == 'pull_request' ) || ( github.ref == 'refs/heads/master' ) }}