chore: use spec suffix for vitest and ct suffix for playwright #268
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: Check code quality | |
on: | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
check: | |
name: Check code quality | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v2 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: .node-version | |
cache: pnpm | |
- name: 📦 Install dependencies | |
run: pnpm install | |
- name: 🔎 Lint | |
run: pnpm run lint:ci:all | |
# we must continue on error here so the eslint results are uploaded to GitHub in the next step. | |
continue-on-error: true | |
- name: Upload eslint results to GitHub | |
uses: github/codeql-action/upload-sarif@v2 | |
with: | |
sarif_file: eslint-results.sarif | |
wait-for-processing: true | |
- name: 🔎 Check formatting | |
run: pnpm run format:check:all | |
- name: 🛠️ Build packages | |
run: pnpm run build:all | |
- name: 🚨 Run unit tests | |
run: pnpm run test:all | |
# make sure that publint is only run after all packages have been built | |
- name: Run publint | |
run: pnpm run publint:all | |
- name: Upload code coverage artifact | |
uses: actions/upload-artifact@v3 | |
if: always() # needed to also upload test results when they failed (useful for debugging) | |
with: | |
name: coverage | |
path: packages/sit-onyx/coverage | |
- name: Upload Storybook artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: storybook-static | |
path: packages/sit-onyx/storybook-static | |
- name: Upload documentation artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: documentation | |
path: apps/docs/src/.vitepress/dist | |
playwright: | |
name: Component tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v2 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: .node-version | |
cache: pnpm | |
- name: 📦 Install dependencies | |
run: pnpm install | |
- name: 🚨 Run component tests | |
uses: ./.github/templates/playwright | |
with: | |
script: test:components | |
working-directory: packages/sit-onyx |