110 lines
4.4 KiB
YAML
110 lines
4.4 KiB
YAML
# The release acceptance matrix on demand (the same jobs as release.yml's acceptance + acceptance-report, which gate
|
|
# every release): every user-facing command from the packed npm tarball on Linux and Windows x Node 20 / Node 22 / Bun,
|
|
# then the markdown matrix (artifact storebound-acceptance). Run it from Actions > acceptance > Run workflow, or with
|
|
# the API (POST /repos/{owner}/{repo}/actions/workflows/acceptance.yml/dispatches). macOS: tools/acceptance.ts on the Mac.
|
|
name: acceptance
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
BUN_VERSION: '1.4.0'
|
|
|
|
jobs:
|
|
acceptance:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- { os: ubuntu-22.04, platform: Linux, runtime: node, node: '20', name: node20 }
|
|
- { os: ubuntu-22.04, platform: Linux, runtime: node, node: '22', name: node22 }
|
|
- { os: ubuntu-22.04, platform: Linux, runtime: bun, node: '22', name: bun }
|
|
- { os: windows, platform: Windows, runtime: node, node: '20', name: node20 }
|
|
- { os: windows, platform: Windows, runtime: node, node: '22', name: node22 }
|
|
- { os: windows, platform: Windows, runtime: bun, node: '22', name: bun }
|
|
runs-on: ${{ matrix.os }}
|
|
timeout-minutes: 45
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: ${{ matrix.node }}
|
|
- name: Bun (Linux)
|
|
if: ${{ matrix.platform == 'Linux' }}
|
|
shell: bash
|
|
run: |
|
|
curl -fsSL https://bun.sh/install | bash -s "bun-v${BUN_VERSION}" >/dev/null
|
|
echo "$HOME/.bun/bin" >> "${FORGEJO_PATH:-$GITHUB_PATH}"
|
|
- name: Acceptance matrix (Linux)
|
|
if: ${{ matrix.platform == 'Linux' }}
|
|
shell: bash
|
|
run: |
|
|
node --version && bun --version
|
|
bun install --frozen-lockfile
|
|
bun tools/acceptance.ts run --runtime ${{ matrix.runtime }} --platform Linux --jobs 4 --out acceptance/Linux-${{ matrix.name }}.json
|
|
- name: Acceptance matrix (Windows)
|
|
if: ${{ matrix.platform == 'Windows' }}
|
|
shell: pwsh
|
|
run: |
|
|
node --version; bun --version
|
|
bun install --frozen-lockfile
|
|
if ($LASTEXITCODE -ne 0) { throw "bun install failed" }
|
|
bun tools/acceptance.ts run --runtime ${{ matrix.runtime }} --platform Windows --jobs 3 --out acceptance/Windows-${{ matrix.name }}.json
|
|
if ($LASTEXITCODE -ne 0) { throw "acceptance matrix: red cells" }
|
|
- uses: actions/upload-artifact@v3
|
|
if: ${{ always() }}
|
|
with:
|
|
name: acceptance-${{ matrix.platform }}-${{ matrix.name }}
|
|
path: acceptance/
|
|
retention-days: 30
|
|
|
|
acceptance-report:
|
|
needs: [acceptance]
|
|
if: ${{ always() }}
|
|
runs-on: ubuntu-22.04
|
|
timeout-minutes: 10
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/download-artifact@v3
|
|
continue-on-error: true
|
|
with:
|
|
name: acceptance-Linux-node20
|
|
path: acceptance-runs/Linux-node20
|
|
- uses: actions/download-artifact@v3
|
|
continue-on-error: true
|
|
with:
|
|
name: acceptance-Linux-node22
|
|
path: acceptance-runs/Linux-node22
|
|
- uses: actions/download-artifact@v3
|
|
continue-on-error: true
|
|
with:
|
|
name: acceptance-Linux-bun
|
|
path: acceptance-runs/Linux-bun
|
|
- uses: actions/download-artifact@v3
|
|
continue-on-error: true
|
|
with:
|
|
name: acceptance-Windows-node20
|
|
path: acceptance-runs/Windows-node20
|
|
- uses: actions/download-artifact@v3
|
|
continue-on-error: true
|
|
with:
|
|
name: acceptance-Windows-node22
|
|
path: acceptance-runs/Windows-node22
|
|
- uses: actions/download-artifact@v3
|
|
continue-on-error: true
|
|
with:
|
|
name: acceptance-Windows-bun
|
|
path: acceptance-runs/Windows-bun
|
|
- name: Matrix (markdown), red cells fail the job
|
|
run: |
|
|
curl -fsSL https://bun.sh/install | bash -s "bun-v${BUN_VERSION}" >/dev/null
|
|
export PATH="$HOME/.bun/bin:$PATH"
|
|
V=$(bun tools/desktop-version.ts --print)
|
|
mkdir -p out
|
|
bun tools/acceptance.ts report acceptance-runs docs/acceptance --md "out/storebound_${V}_acceptance.md" --expect 9 --strict
|
|
- uses: actions/upload-artifact@v3
|
|
if: ${{ always() }}
|
|
with:
|
|
name: storebound-acceptance
|
|
path: out/
|
|
retention-days: 30
|