Some checks failed
Test / test (pull_request) Has been cancelled
The Docker-image builds ran independently of the Test workflow, so a failing test would not block publishing the :develop image (or a release). GitHub Actions `needs:` only works within one workflow, so the two separate workflows didn't depend on each other. Make test.yml a reusable workflow (workflow_call) and call it from develop.yml and release.yml as a `test` job that `build` depends on (`needs: test`); release's `release` job already needs `build`, so it waits transitively. test.yml keeps its pull_request trigger for PR gating; its redundant push:develop trigger is dropped (develop.yml now calls it on push). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
41 lines
850 B
YAML
41 lines
850 B
YAML
name: Test
|
|
|
|
on:
|
|
pull_request:
|
|
workflow_call:
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: test-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up pnpm
|
|
uses: pnpm/action-setup@v4
|
|
|
|
- name: Set up Node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
cache: pnpm
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
# Required for the client suite, which resolves @docmost/editor-ext via its
|
|
# dist build (the server suite also rebuilds it through its own pretest).
|
|
- name: Build editor-ext
|
|
run: pnpm --filter @docmost/editor-ext build
|
|
|
|
- name: Run tests
|
|
run: pnpm -r test
|