mirror of
https://github.com/Sea-Haven-Industries/seahaven-ap.git
synced 2026-09-30 04:33:15 +00:00
ci(workflows): call org frontend CI on the merge queue (#67)
The sequential ci / ci caller cannot emit ci-complete. Build shared before unit tests so the parallel frontend job can import the workspace package.
This commit is contained in:
parent
864531b51e
commit
c26bb2a4da
2 changed files with 37 additions and 6 deletions
41
.github/workflows/ci.yaml
vendored
41
.github/workflows/ci.yaml
vendored
|
|
@ -1,17 +1,48 @@
|
||||||
name: CI
|
name: CI
|
||||||
|
|
||||||
|
# Parallel org callers. ci-complete is the check name the CI complete ruleset
|
||||||
|
# requires. merge_group stays so the merge queue runs these portions.
|
||||||
|
# There is no terraform/ tree on main, so this caller has no terraform job.
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [main]
|
branches: [main, hotfix/**, release/**]
|
||||||
merge_group:
|
merge_group:
|
||||||
|
push:
|
||||||
|
branches: [hotfix/**, release/**]
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
ci:
|
autofix:
|
||||||
# Job id MUST stay `ci`: the reusable's job is also `ci`, so the check
|
if: github.event_name == 'pull_request' && !github.event.pull_request.head.repo.fork
|
||||||
# context resolves to the required `ci / ci`.
|
uses: Sea-Haven-Industries/.github/.github/workflows/ci-autofix.yaml@0a1010e63248c9ca9f042c870eb2c579ba6b9455 # v1.0.19
|
||||||
uses: Sea-Haven-Industries/.github/.github/workflows/ci-typescript-frontend.yaml@9781774f04b824b1182ff41638687f1c01c04361 # v1.0.11
|
permissions:
|
||||||
|
contents: write
|
||||||
|
secrets: inherit
|
||||||
|
with:
|
||||||
|
presets: prettier
|
||||||
|
|
||||||
|
frontend:
|
||||||
|
needs: autofix
|
||||||
|
if: always() && !cancelled() && (needs.autofix.result == 'skipped' || needs.autofix.outputs.committed != 'true')
|
||||||
|
uses: Sea-Haven-Industries/.github/.github/workflows/ci-frontend.yaml@0a1010e63248c9ca9f042c870eb2c579ba6b9455 # v1.0.19
|
||||||
with:
|
with:
|
||||||
node-version: "24"
|
node-version: "24"
|
||||||
|
unit-shards: 1
|
||||||
|
run-e2e: true
|
||||||
|
|
||||||
|
ci-complete:
|
||||||
|
name: ci-complete
|
||||||
|
needs: [autofix, frontend]
|
||||||
|
if: always() && !cancelled() && (needs.autofix.result == 'skipped' || needs.autofix.outputs.committed != 'true')
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 5
|
||||||
|
steps:
|
||||||
|
- name: Require portions
|
||||||
|
env:
|
||||||
|
FRONTEND: ${{ needs.frontend.result }}
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
test "${FRONTEND}" = success
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
"db:migrate": "npm run db:migrate -w @seahaven-ap/api",
|
"db:migrate": "npm run db:migrate -w @seahaven-ap/api",
|
||||||
"db:seed": "npm run db:seed -w @seahaven-ap/api",
|
"db:seed": "npm run db:seed -w @seahaven-ap/api",
|
||||||
"db:generate": "npm run db:generate -w @seahaven-ap/api",
|
"db:generate": "npm run db:generate -w @seahaven-ap/api",
|
||||||
"test": "npm run test -w @seahaven-ap/shared && npm run test -w @seahaven-ap/api && vitest run",
|
"test": "npm run build:shared && npm run test -w @seahaven-ap/shared && npm run test -w @seahaven-ap/api && vitest run",
|
||||||
"test:watch": "vitest",
|
"test:watch": "vitest",
|
||||||
"test:e2e": "playwright test",
|
"test:e2e": "playwright test",
|
||||||
"lint": "eslint . --max-warnings=0 && npm run lint:api",
|
"lint": "eslint . --max-warnings=0 && npm run lint:api",
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue