name: Go-Tests on: pull_request: types: [opened, synchronize, reopened] branches: - master - main push: branches: - master - main - "releases/**" 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.24 - name: Launch Test run: | go mod tidy go vet ./... && go test -coverprofile=coverprofile.out -json -v ./... > gotest.json - uses: actions/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 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 }}