chore(deps): update dependency vitest to v2.1.9 [security] (#1019) #3142
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: CI | |
on: | |
workflow_dispatch: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
env: | |
HUSKY: 0 | |
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 | |
TURBO_CACHE_DIR: .turbo | |
VRT_BROWSER: chromium | |
jobs: | |
build-devcontainer: | |
if: github.ref == 'refs/heads/main' && github.event_name == 'push' | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
permissions: | |
packages: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Repository variables | |
id: repository-variables | |
run: | | |
echo "lowercase=${GITHUB_REPOSITORY@L}" >> $GITHUB_OUTPUT | |
echo "name=${GITHUB_REPOSITORY#*/}" >> $GITHUB_OUTPUT | |
- name: Build dev container image | |
uses: devcontainers/[email protected] | |
with: | |
configFile: ./.devcontainer/devcontainer-base.json | |
imageName: ghcr.io/${{ steps.repository-variables.outputs.lowercase }}/devcontainer | |
cacheFrom: ghcr.io/${{ steps.repository-variables.outputs.lowercase }}/devcontainer | |
push: always | |
- name: Delete outdated images | |
uses: actions/delete-package-versions@v5 | |
with: | |
package-name: '${{ steps.repository-variables.outputs.name }}/devcontainer' | |
package-type: 'container' | |
token: ${{ secrets.GITHUB_TOKEN }} | |
min-versions-to-keep: 2 | |
delete-only-untagged-versions: 'true' | |
test: | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Cache Turbo | |
uses: actions/cache@v4 | |
with: | |
path: ${{ env.TURBO_CACHE_DIR }} | |
key: turbo-${{ runner.os }}-${{ github.job }}-${{ github.sha }} | |
restore-keys: | | |
turbo-${{ runner.os }}-${{ github.job }} | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v4 | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: 'package.json' | |
cache: 'pnpm' | |
- name: Install dependencies | |
# change to pnpm ci once it is implemented | |
run: | | |
pnpm i --frozen-lockfile --loglevel warn | |
pnpm exec playwright install --with-deps chromium | |
- name: Lint files | |
run: pnpm run lint | |
- name: Run tests | |
run: pnpm run test | |
- name: Build | |
run: pnpm run build | |
vrt: | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
lfs: 'true' | |
- name: Pull LFS files | |
run: git lfs pull | |
- name: Cache Turbo | |
uses: actions/cache@v4 | |
with: | |
path: ${{ env.TURBO_CACHE_DIR }} | |
key: turbo-${{ runner.os }}-${{ github.job }}-${{ github.sha }} | |
restore-keys: | | |
turbo-${{ runner.os }}-${{ github.job }} | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v4 | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: 'package.json' | |
cache: 'pnpm' | |
- name: Install dependencies | |
# change to pnpm ci once it is implemented | |
run: | | |
pnpm i --frozen-lockfile --loglevel warn | |
pnpm exec playwright install --with-deps ${{ env.VRT_BROWSER }} | |
- name: Run tests | |
run: pnpm run vrt | |
- name: Upload report | |
uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: vrt-report | |
path: | | |
apps/*/vrt/report | |
packages/*/vrt/report | |
retention-days: 1 | |
lighthouse: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Cache Turbo | |
uses: actions/cache@v4 | |
with: | |
path: ${{ env.TURBO_CACHE_DIR }} | |
key: turbo-${{ runner.os }}-${{ github.job }}-${{ github.sha }} | |
restore-keys: | | |
turbo-${{ runner.os }}-${{ github.job }} | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v4 | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: 'package.json' | |
cache: 'pnpm' | |
- name: Install dependencies | |
# change to pnpm ci once it is implemented | |
run: | | |
pnpm i --frozen-lockfile --loglevel warn | |
pnpm exec playwright install --with-deps chromium | |
- name: Perform lighthouse mobile audit | |
run: pnpm lighthouse-mobile | |
- name: Perform lighthouse desktop audit | |
run: pnpm lighthouse-desktop | |
- name: Upload reports | |
uses: actions/upload-artifact@v4 | |
if: success() || failure() | |
with: | |
name: lighthouse-report | |
path: apps/*/lighthouse-reports | |
retention-days: 1 | |
e2e: | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
strategy: | |
matrix: | |
browser: [chromium, firefox, webkit] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Cache Turbo | |
uses: actions/cache@v4 | |
with: | |
path: ${{ env.TURBO_CACHE_DIR }} | |
key: turbo-${{ runner.os }}-${{ github.job }}-${{ github.sha }} | |
restore-keys: | | |
turbo-${{ runner.os }}-${{ github.job }} | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v4 | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: 'package.json' | |
cache: 'pnpm' | |
- name: Install dependencies | |
# change to pnpm ci once it is implemented | |
run: | | |
pnpm i --frozen-lockfile --loglevel warn | |
pnpm exec playwright install --with-deps ${{ matrix.browser }} | |
- name: Build | |
run: pnpm run build | |
env: | |
VITE_E2E: true | |
- name: Run tests | |
run: pnpm run e2e --force --no-cache -- --project="${{ matrix.browser }}" | |
- uses: actions/upload-artifact@v4 | |
if: success() || failure() | |
with: | |
name: e2e-report-${{ matrix.browser }} | |
path: apps/*/e2e/report | |
retention-days: 1 |