Create separate components for the various Dataset SVGs #374
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: CI | |
| on: | |
| pull_request: | |
| types: [opened, edited, synchronize] | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| workflow_call: | |
| inputs: | |
| skip-sonar: | |
| description: 'Skip SonarQube scan' | |
| type: boolean | |
| default: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v5 | |
| with: | |
| node-version-file: .nvmrc | |
| cache: 'npm' | |
| - name: Cache webpack and build artifacts | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| node_modules/.cache/webpack | |
| node_modules/.cache/terser-webpack-plugin | |
| key: ${{ runner.os }}-build-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('webpack.*.mjs', 'babel.config.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-build-${{ hashFiles('**/package-lock.json') }}- | |
| ${{ runner.os }}-build- | |
| - name: Cache Jest | |
| uses: actions/cache@v4 | |
| with: | |
| path: .jest-cache | |
| key: ${{ runner.os }}-jest-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('jest.config.mjs') }} | |
| restore-keys: | | |
| ${{ runner.os }}-jest-${{ hashFiles('**/package-lock.json') }}- | |
| ${{ runner.os }}-jest- | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Linter | |
| run: npm run lint | |
| - name: Unit tests | |
| run: npm run test | |
| - name: SonarQube Scan | |
| if: inputs.skip-sonar != true | |
| uses: SonarSource/sonarqube-scan-action@v6 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |