Merge pull request #13 from PAYONE-GmbH/develop #66
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: Quality Check (Build, Lint, Format, Test, Sonarcloud) | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
- develop | |
workflow_dispatch: | |
workflow_call: | |
jobs: | |
test: | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
node: [18, 20, 22, 23] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: Install dependencies | |
run: npm ci | |
- name: Run Build | |
run: npm run build | |
- name: Run Linting | |
run: npm run lint | |
- name: Run Format Check | |
run: npm run format:check | |
- name: Run Tests | |
run: npm run test | |
sonar: | |
needs: [test] | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
- name: Install dependencies | |
run: npm ci | |
- name: Run Tests with coverage | |
run: npm run test:coverage | |
- name: Run SonarCloud Scan | |
uses: SonarSource/sonarcloud-github-action@master | |
env: | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |