Bump actions/setup-node from 5 to 6 #240
Workflow file for this run
This file contains hidden or 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 Gate Validation | |
| description: Validate code quality and run tests only on main branch | |
| permissions: | |
| contents: read | |
| env: | |
| NODE_VERSION: 20 | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| branches: | |
| - main | |
| jobs: | |
| quality-gate: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: 🛑 Cancel previous runs | |
| uses: styfle/[email protected] | |
| - name: ⬇️ Checkout repo | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - name: ⎔ Setup node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| cache: "npm" | |
| registry-url: https://npm.pkg.github.com/ | |
| - name: Cache dependencies | |
| id: cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ./node_modules | |
| key: modules-node-${{ hashFiles('package-lock.json') }} | |
| - name: 📥 Download deps | |
| if: github.actor != 'dependabot[bot]' | |
| run: | | |
| npm ci --ignore-scripts | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| - name: Run Unit test with coverage | |
| if: github.actor != 'dependabot[bot]' | |
| run: npm run test:ci | |
| - name: 📊 Quality Gate Scan | |
| uses: SonarSource/sonarcloud-github-action@v5 | |
| if: github.actor != 'dependabot[bot]' | |
| env: | |
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |