feat(app): [KDL6-185] improve user tools operator #374
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "[QA] Quality Checks API" | |
on: | |
workflow_dispatch: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
paths: | |
- 'app/api/*' | |
push: | |
paths: | |
- 'app/api/*' | |
jobs: | |
quality-checks: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
pull-requests: read | |
checks: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
persist-credentials: false | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.23.2 | |
- name: API Go Lint | |
uses: golangci/golangci-lint-action@v6 | |
with: | |
version: v1.62.2 | |
working-directory: ./app/api | |
args: --config ../../.github/.golangci.yml | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: API Test | |
run: go test ./... --tags=integration,unit -cover -v -coverprofile=coverage.out | |
working-directory: ./app/api | |
- name: API Archive code coverage results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: coverage-report | |
path: app/api/coverage.out | |
sonarcloud: | |
name: SonarCloud | |
runs-on: ubuntu-latest | |
needs: quality-checks | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
persist-credentials: false | |
- name: Download code coverage results | |
uses: actions/download-artifact@v4 | |
with: | |
name: coverage-report | |
path: app/api | |
- name: SonarCloud Scan | |
uses: SonarSource/sonarcloud-github-action@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
with: | |
projectBaseDir: app/api |