- Followup of https://github.com/stats-organization/github-stats-extended/pull/91 Dependabot does not update the version specified in the container image. Reading the version directly from package.json prevents potential version mismatches.
119 lines
2.6 KiB
YAML
119 lines
2.6 KiB
YAML
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
|
||
|
||
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: Install Playwright Browsers
|
||
run: pnpm exec playwright install --with-deps
|
||
|
||
- 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 ESLint’s 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
|