mirror of
https://github.com/Sea-Haven-Industries/seahaven-ap.git
synced 2026-09-30 03:23:16 +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
|
||||
|
||||
# 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:
|
||||
pull_request:
|
||||
branches: [main]
|
||||
branches: [main, hotfix/**, release/**]
|
||||
merge_group:
|
||||
push:
|
||||
branches: [hotfix/**, release/**]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
# Job id MUST stay `ci`: the reusable's job is also `ci`, so the check
|
||||
# context resolves to the required `ci / ci`.
|
||||
uses: Sea-Haven-Industries/.github/.github/workflows/ci-typescript-frontend.yaml@9781774f04b824b1182ff41638687f1c01c04361 # v1.0.11
|
||||
autofix:
|
||||
if: github.event_name == 'pull_request' && !github.event.pull_request.head.repo.fork
|
||||
uses: Sea-Haven-Industries/.github/.github/workflows/ci-autofix.yaml@0a1010e63248c9ca9f042c870eb2c579ba6b9455 # v1.0.19
|
||||
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:
|
||||
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:seed": "npm run db:seed -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:e2e": "playwright test",
|
||||
"lint": "eslint . --max-warnings=0 && npm run lint:api",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue