Skip to content

workflows: test improvements #1

workflows: test improvements

workflows: test improvements #1

Workflow file for this run

name: Run tests
on:
workflow_call:

Check failure on line 3 in .github/workflows/run-tests.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/run-tests.yml

Invalid workflow file

You have an error in your yaml syntax on line 3
secrets:
GITHUB_TOKEN:
required: true
SONAR_TOKEN:
required: true
jobs:
go_test:
runs-on: ubuntu-latest
steps:
- name: checkout PR ${{ github.event.pull_request.number }}
if: ${{ github.event_name == 'pull_request_target' }}
uses: actions/[email protected]
with:
fetch-depth: 0 # for SonarQube
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
- name: checkout
- uses: actions/[email protected]
if: ${{ github.event_name == 'push' }}
with:
fetch-depth: 0 # for SonarQube
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- run: "make verify"
- run: "make test"
- name: SonarQube for PR ${{ github.event.pull_request.number }}
if: ${{ github.event_name == 'pull_request_target' }}
uses: SonarSource/[email protected]
with:
args: >
-Dsonar.pullrequest.key=${{ github.event.pull_request.number }}
-Dsonar.scm.revision=${{ github.event.pull_request.head.sha }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- name: SonarQube
if: ${{ github.event_name == 'push' }}
uses: SonarSource/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}