mirror of
https://github.com/oxynote/oxynote.git
synced 2026-10-19 11:55:57 +02:00
91 lines
2.2 KiB
YAML
91 lines
2.2 KiB
YAML
name: QA
|
|
|
|
on:
|
|
# the release workflow runs every gate on a tag and publishes only
|
|
# once they all pass, so each one has to be callable.
|
|
workflow_call:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- web/**
|
|
- .github/workflows/qa-web.yml
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- web/**
|
|
- .github/workflows/qa-web.yml
|
|
|
|
# a newer push supersedes the still-running workflow of the stale commit
|
|
# and cancels it. The group carries a hardcoded per-file prefix because
|
|
# every QA workflow shares the display name "QA", so github.workflow
|
|
# would put them all in one group and let a run of one workflow cancel
|
|
# an in-flight run of another.
|
|
concurrency:
|
|
group: qa-web-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
|
|
jobs:
|
|
lint:
|
|
name: Linting web
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out the code
|
|
uses: actions/checkout@v7
|
|
|
|
- name: Set up pnpm
|
|
uses: pnpm/action-setup@v6
|
|
with:
|
|
package_json_file: web/package.json
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@v7
|
|
with:
|
|
node-version: 24
|
|
cache: pnpm
|
|
cache-dependency-path: web/pnpm-lock.yaml
|
|
|
|
- name: Installing dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
working-directory: web
|
|
|
|
- name: Run check-lint
|
|
run: pnpm run check-lint
|
|
working-directory: web
|
|
|
|
test:
|
|
name: Testing web
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out the code
|
|
uses: actions/checkout@v7
|
|
|
|
- name: Set up pnpm
|
|
uses: pnpm/action-setup@v6
|
|
with:
|
|
package_json_file: web/package.json
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@v7
|
|
with:
|
|
node-version: 24
|
|
cache: pnpm
|
|
cache-dependency-path: web/pnpm-lock.yaml
|
|
|
|
- name: Installing dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
working-directory: web
|
|
|
|
- name: Install playwright browsers
|
|
run: pnpm exec playwright install --with-deps chromium
|
|
working-directory: web
|
|
|
|
- name: Run tests
|
|
run: pnpm run test
|
|
working-directory: web
|