Files
sase.tr/.github/workflows/qa-gate.yml
Fusion 746c7e552c
Some checks failed
Sync dev → Gitea / Mirror dev to Gitea (push) Has been cancelled
fix(ci): qa-gate — remove duplicate pnpm version pin
pnpm/action-setup@v4 conflicts when both workflow `version: 10` and
package.json `"packageManager": "pnpm@10.29.3"` are set. Drop the
workflow pin and let action-setup read packageManager.

Unblocks the QA gate workflow on PRs (was failing in setup before
tests ran, e.g. run 25784218896).
2026-05-13 08:15:11 +00:00

57 lines
1.4 KiB
YAML

name: QA Gate (P0/P1)
on:
pull_request:
types: [opened, synchronize, reopened]
paths:
- "apps/api/**"
- "apps/web/**"
concurrency:
group: qa-gate-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
test-affected:
name: Test affected app
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: "pnpm"
- run: pnpm install --frozen-lockfile
- name: Determine affected app
id: affected
run: |
API_CHANGED=false
WEB_CHANGED=false
if git diff --name-only "origin/${{ github.base_ref }}...HEAD" | grep -q '^apps/api/'; then
API_CHANGED=true
fi
if git diff --name-only "origin/${{ github.base_ref }}...HEAD" | grep -q '^apps/web/'; then
WEB_CHANGED=true
fi
echo "api_changed=$API_CHANGED" >> $GITHUB_OUTPUT
echo "web_changed=$WEB_CHANGED" >> $GITHUB_OUTPUT
- name: Run API tests
if: steps.affected.outputs.api_changed == 'true'
run: pnpm --filter api test
- name: Run Web tests
if: steps.affected.outputs.web_changed == 'true'
run: pnpm --filter web test