docs(release): design system packages #1235
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: Continuous Integration | |
| # Triggers the following workflows: | |
| # - .github/workflows/codecov.yml | |
| # - .github/workflows/chromatic.yml | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| block-autosquash-commits: | |
| name: Block Autosquash Commits | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Block Autosquash Commits | |
| uses: xt0rted/block-autosquash-commits-action@79880c36b4811fe549cfffe20233df88876024e7 # v2.2.0 | |
| with: | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| install: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Install pnpm package manager | |
| uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0 | |
| - name: Set up Node.js version and cache | |
| uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 | |
| with: | |
| node-version-file: .nvmrc | |
| - name: Check for known security issues with npm packages | |
| run: | | |
| echo "Auditing npm dependencies before installing them. For more information, see: https://nldesignsystem.nl/pnpm-audit" | |
| pnpm audit --audit-level critical | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| lint: | |
| runs-on: ubuntu-latest | |
| needs: install | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| # Fetch all history for all branches so that `changeset:status` in package.json#scripts can determine if | |
| # a changeset is needed or not. | |
| fetch-depth: 0 | |
| - name: Install pnpm package manager | |
| uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0 | |
| - name: Set up Node.js version and cache | |
| uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 | |
| with: | |
| node-version-file: .nvmrc | |
| - name: Check for known security issues with npm packages | |
| run: | | |
| echo "Auditing npm dependencies before installing them. For more information, see: https://nldesignsystem.nl/pnpm-audit" | |
| pnpm audit --audit-level critical | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Lint | |
| run: pnpm run lint | |
| - name: Check if a changeset is needed | |
| id: changeset | |
| # ONLY run this step if: | |
| # | |
| # 1. the branch was not created by the Changeset Action itself | |
| # 2. the branch was not created by NL Design System Bot | |
| if: ${{ !startsWith(github.ref_name, 'changeset-release/') && github.actor != 'nl-design-system-ci' }} | |
| run: pnpm run changeset:status | |
| - name: ShellCheck | |
| uses: ludeeus/action-shellcheck@00cae500b08a931fb5698e11e79bfbd38e612a38 # v2.2.0 | |
| with: | |
| # Pin Shellcheck version. Find new versions here: | |
| # https://github.com/koalaman/shellcheck/tags | |
| version: v0.11.0 | |
| ignore_paths: >- | |
| node_modules | |
| vendor | |
| build | |
| coverage | |
| dist | |
| tmp | |
| build: | |
| runs-on: ubuntu-latest | |
| needs: install | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Install pnpm package manager | |
| uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0 | |
| - name: Set up Node.js version and cache | |
| uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 | |
| with: | |
| node-version-file: .nvmrc | |
| - name: Check for known security issues with npm packages | |
| run: | | |
| echo "Auditing npm dependencies before installing them. For more information, see: https://nldesignsystem.nl/pnpm-audit" | |
| pnpm audit --audit-level critical | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build | |
| run: pnpm run build | |
| - name: Upload visual-regression-testing artifact | |
| uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 | |
| with: | |
| name: visual-regression-testing | |
| path: packages/storybook-test/dist/ | |
| retention-days: 1 | |
| test: | |
| runs-on: ubuntu-latest | |
| needs: install | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Install pnpm package manager | |
| uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0 | |
| - name: Set up Node.js version and cache | |
| uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 | |
| with: | |
| node-version-file: .nvmrc | |
| - name: Check for known security issues with npm packages | |
| run: | | |
| echo "Auditing npm dependencies before installing them. For more information, see: https://nldesignsystem.nl/pnpm-audit" | |
| pnpm audit --audit-level critical | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build | |
| run: pnpm run build | |
| - name: Test | |
| run: pnpm run test:coverage | |
| - name: Upload coverage-report artifact | |
| uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 | |
| with: | |
| name: coverage-report | |
| path: packages/components-react/*/coverage/ | |
| retention-days: 1 |