Files
github-stats-extended/.github/workflows/ci.yml
T
Marco Pasqualetti d6a08721c1 feat(frontend): move fullSuffix management in a standalone file to simplify testing (#73)
- move `fullSuffix` into a standalone function
- setup `vitest` as test framework for frontend package
2026-02-11 11:21:50 +01:00

130 lines
3.0 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
name: CI
on:
workflow_dispatch:
push:
branches:
- master
pull_request:
branches:
- master
concurrency:
group: "${{ github.workflow }}-${{ github.head_ref }}"
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
permissions: {}
jobs:
build-and-test:
name: Build and test ${{ matrix.node }} on ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
node: [24]
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Run vercel-preparation.sh
run: |
chmod +x ./vercel-preparation.sh
./vercel-preparation.sh
- name: Install Dependencies
uses: ./.github/actions/install-dependencies
with:
node-version: ${{ matrix.node }}
- name: Build frontend
run: pnpm --filter frontend run build
- name: Run frontend tests
run: pnpm --filter frontend run test
- name: Run backend tests
run: pnpm --filter github-readme-stats run test
frontend-test-e2e:
name: Frontend E2E test
permissions:
contents: read
timeout-minutes: 60
runs-on: ubuntu-latest
# Use official playwright docker image, which already includes browsers and related system dependencies.
# By doing this ci time we can skip the following step:
#
# ```yml
# - name: Install Playwright Browsers
# run: pnpm exec playwright install --with-deps
# ```
#
# By doing so job execution time is reduced by ~20s
#
# @see https://playwright.dev/docs/docker
container:
image: mcr.microsoft.com/playwright:v1.58.0-noble
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Install Dependencies
uses: ./.github/actions/install-dependencies
- name: Run vercel-preparation.sh
run: |
chmod +x ./vercel-preparation.sh
./vercel-preparation.sh
- name: Run Playwright tests
run: pnpm --filter frontend run test:e2e
code-checks:
name: Code checks
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v6
# Heads up!
#
# 1. Execution of this script is needed to resolve `.vercel` folder from `apps/frontend/src/components/Card/SVG.js`
# 2. This scripts removes `apps/backend/node_modules` breaking ESLints module resolution.
# Dependency installation must occur after running ./vercel-preparation.sh.
- name: Run vercel-preparation.sh
run: |
chmod +x ./vercel-preparation.sh
./vercel-preparation.sh
- name: Install Dependencies
uses: ./.github/actions/install-dependencies
- name: Format
run: pnpm run format:check
- name: Lint
run: pnpm run lint
- name: Lint (knip)
run: pnpm run lint:knip
- name: Typecheck
run: pnpm run typecheck