Files
github-stats-extended/.github/workflows/ci.yml
T
Martin 3fc1484fcd ci: avoid multiple ci runs when event is pull_request (#48)
-
https://docs.github.com/en/actions/how-tos/write-workflows/choose-when-workflows-run/control-workflow-concurrency
-
https://docs.github.com/en/actions/reference/workflows-and-actions/contexts#github-context
> `github.ref_name`: The short ref name of the branch or tag that
triggered the workflow run. This value matches the branch or tag name
shown on GitHub. For example, feature-branch-1.For pull requests that
were not merged, the format is <pr_number>/merge.
2026-02-08 06:50:49 +01:00

81 lines
1.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: Install Dependencies
uses: ./.github/actions/install-dependencies
with:
node-version: ${{ matrix.node }}
- name: Run vercel-preparation.sh
run: |
chmod +x ./vercel-preparation.sh
./vercel-preparation.sh
- name: Build frontend
run: pnpm --filter frontend run build
code-checks:
name: Code checks
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Install Dependencies
uses: ./.github/actions/install-dependencies
# needed to resolve .vercel folder from apps/frontend/src/components/Card/SVG.js
- name: Run vercel-preparation.sh
run: |
chmod +x ./vercel-preparation.sh
./vercel-preparation.sh
- 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