2024-07-19 08:03:35 +00:00
|
|
|
name: Gitea Build Check
|
|
|
|
run-name: ${{ gitea.actor }} is testing the build
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2024-07-19 12:13:31 +00:00
|
|
|
- ci/*
|
2024-07-19 12:45:52 +00:00
|
|
|
- dev/*
|
2024-07-19 08:03:35 +00:00
|
|
|
pull_request:
|
|
|
|
branches: [ "main" ]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
Build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-07-19 12:40:20 +00:00
|
|
|
- name: Checkout Git Repo
|
|
|
|
uses: actions/checkout@v4
|
2024-07-19 08:03:35 +00:00
|
|
|
with:
|
|
|
|
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
|
|
|
|
|
|
|
|
- name: Setup Go environment
|
2024-07-19 12:13:07 +00:00
|
|
|
uses: https://gitea.com/actions/setup-go@v3
|
2024-07-19 08:03:35 +00:00
|
|
|
with:
|
2024-07-19 12:13:07 +00:00
|
|
|
go-version-file: 'go.mod'
|
2024-07-19 12:29:05 +00:00
|
|
|
cache: false
|
2024-07-19 08:03:35 +00:00
|
|
|
|
|
|
|
- name: Execute Go Test files with coverage report
|
|
|
|
run: TESTCONTAINERS_RYUK_DISABLED=true go test -v ./... -json -coverprofile="coverage.out" | tee "test-report.out"
|
|
|
|
|
2024-07-19 12:40:20 +00:00
|
|
|
- name: SonarQube
|
|
|
|
uses: sonarsource/sonarqube-scan-action@master
|
2024-07-19 08:03:35 +00:00
|
|
|
env:
|
|
|
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
2024-07-19 12:13:07 +00:00
|
|
|
SONAR_HOST_URL: ${{ vars.SONAR_HOST_URL }}
|