Use pnpm. Upgrade devDependencies #1059
Workflow file for this run
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: build | |
on: | |
push: | |
branches: | |
- master | |
- release | |
pull_request: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node: ["18.20.2", "20.13.1", "22.2.0"] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Extract branch name | |
shell: bash | |
run: echo "branch=$(echo ${GITHUB_REF##*/})" >> $GITHUB_OUTPUT | |
id: extract-branch | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
- name: Install Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: Install dependencies | |
run: pnpm install | |
- name: Check spelling | |
run: pnpm run cspell | |
- name: Lint | |
run: pnpm run lint | |
- name: Check types | |
run: pnpm run tsc | |
- name: Test unit | |
run: pnpm run test:unit | |
- name: Test mutation | |
run: pnpm run test:mutation | |
env: | |
BRANCH_NAME: ${{ steps.extract-branch.outputs.branch }} | |
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_TOKEN }} | |
- name: Test E2E | |
run: pnpm run test:e2e | |
id: test-e2e | |
- name: Upload E2E tests screenshots | |
if: ${{ always() && steps.test-e2e.outcome == 'failure' }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: e2e-screenshots-${{ matrix.node }} | |
path: test-e2e/react-app/cypress/screenshots | |
retention-days: 7 | |
- name: Upload typescript E2E tests screenshots | |
if: ${{ always() && steps.test-e2e.outcome == 'failure' }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: e2e-typescript-screenshots-${{ matrix.node }} | |
path: test-e2e/typescript/cypress/screenshots | |
retention-days: 7 | |
- name: Upload test results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: coverage-${{ matrix.node }} | |
path: coverage | |
retention-days: 1 | |
quality: | |
runs-on: ubuntu-latest | |
needs: test | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Download test results | |
uses: actions/download-artifact@v4 | |
with: | |
name: coverage-18.20.2 | |
path: coverage | |
- name: Coveralls | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: SonarCloud Scan | |
if: env.SONAR_TOKEN != '' | |
uses: sonarsource/sonarcloud-github-action@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |