mirror of
https://github.com/stablyai/orca.git
synced 2026-09-22 08:02:28 +00:00
The e2e reusable workflow defaulted to github.ref, which on pull_request events is refs/pull/N/merge. GitHub does not compute that ref when the PR has conflicts or before the merge commit is ready, causing actions/checkout to fail with "couldn't find remote ref refs/pull/N/merge" for reasons unrelated to the code. Pass github.event.pull_request.head.sha from pr.yml so e2e checks out the PR head directly. Motivating failure: https://github.com/stablyai/orca/actions/runs/24768962365 Seen on #937.
55 lines
1.2 KiB
YAML
55 lines
1.2 KiB
YAML
name: PR Checks
|
|
|
|
on:
|
|
pull_request:
|
|
types:
|
|
- opened
|
|
- synchronize
|
|
- reopened
|
|
- ready_for_review
|
|
|
|
jobs:
|
|
verify:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install native build tools
|
|
run: sudo apt-get update && sudo apt-get install -y build-essential python3
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 24
|
|
|
|
- name: Setup pnpm
|
|
uses: pnpm/action-setup@v4
|
|
with:
|
|
run_install: false
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Lint
|
|
run: pnpm exec oxlint --format github
|
|
|
|
- name: Typecheck
|
|
run: pnpm typecheck
|
|
|
|
- name: Test
|
|
run: pnpm test
|
|
|
|
- name: Build
|
|
run: pnpm build
|
|
|
|
e2e:
|
|
uses: ./.github/workflows/e2e.yml
|
|
# Why: check out the PR head directly instead of refs/pull/N/merge.
|
|
# The merge ref doesn't exist when the PR has conflicts or GitHub
|
|
# hasn't computed the merge commit yet, causing checkout to fail
|
|
# for reasons unrelated to the code under test.
|
|
with:
|
|
ref: ${{ github.event.pull_request.head.sha }}
|