Files
katenary/.gitea/workflows/go-test.yaml
Patrice Ferlet 763b204760
Some checks failed
Go-Tests / tests (push) Successful in 1m57s
Go-Tests / sonar (push) Failing after 29s
move everything
2025-08-19 16:28:35 +02:00

54 lines
1.4 KiB
YAML

name: Go-Tests
on:
push:
branches:
- "**"
jobs:
tests:
permissions:
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.25
- name: Install helm
run: |
command -v helm || curl -sSL https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
- name: Tidy
run: |
export GOPROXY='https://proxy.golang.org,direct'
go mod tidy
- name: Launch Test
run: |
go vet ./...
go test -coverprofile=coverprofile.out -json -v ./... > gotest.json
# - uses: actions/upload-artifact@v4
- uses: christopherhx/gitea-upload-artifact@v4
with:
name: tests-results
path: |
coverprofile.out
gotest.json
sonar:
permissions:
contents: read
pull-requests: read
runs-on: ubuntu-latest
needs: tests
steps:
- uses: actions/checkout@v4
#- uses: actions/download-artifact@v4
- uses: christopherhx/gitea-download-artifact@v4
with:
name: tests-results
- name: SonarQube Scan
uses: SonarSource/sonarqube-scan-action@v5.2.0
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ vars.SONAR_HOST_URL }}