Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 34 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ concurrency:

jobs:
quality:
name: Format, Lint, Typecheck, Test, Browser Test, Build
name: Format, Lint, Typecheck, Test, Build
runs-on: ubuntu-latest
# 20 minutes starves dependency-bump branches: a lockfile change cold-starts
# every cache and slow runners then hit the cap mid-pipeline.
Expand Down Expand Up @@ -58,7 +58,38 @@ jobs:
run: vp exec vp run -r --concurrency-limit 2 typecheck

- name: Test
run: vp exec vp run test
# --parallel drops package ordering: server depends on web, so without it
# the server suite (~2.5 min) waits for the web suite (~3 min) to finish.
run: vp exec vp run --parallel --concurrency-limit 4 test

- name: Build desktop pipeline
run: vp exec vp run build:desktop

- name: Verify preload bundle output
run: |
test -f apps/desktop/dist-electron/preload.cjs
grep -nE "desktopBridge|getLocalEnvironmentBootstrap|PICK_FOLDER_CHANNEL|wsUrl" apps/desktop/dist-electron/preload.cjs

browser:
# Runs beside `quality` rather than after it: the browser suite is the
# second-longest step and shares nothing with the unit suite.
name: Browser Test
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Setup Vite+
uses: voidzero-dev/setup-vp@313600b80b104eadebb9111787d37a2e83e014ca # v1.17.0
with:
node-version-file: package.json
cache: true
version: "0.2.4"
run-install: false

- name: Install dependencies
run: vp install --frozen-lockfile

# Hosted runners point apt at azure.archive.ubuntu.com, which
# intermittently stalls for 20+ minutes and starves the job timeout.
Expand All @@ -84,14 +115,6 @@ jobs:
path: apps/web/src/**/__screenshots__/**
if-no-files-found: ignore

- name: Build desktop pipeline
run: vp exec vp run build:desktop

- name: Verify preload bundle output
run: |
test -f apps/desktop/dist-electron/preload.cjs
grep -nE "desktopBridge|getLocalEnvironmentBootstrap|PICK_FOLDER_CHANNEL|wsUrl" apps/desktop/dist-electron/preload.cjs

release_smoke:
name: Release Smoke
runs-on: ubuntu-latest
Expand All @@ -118,6 +141,7 @@ jobs:
name: Deploy app.threadlines.dev
needs:
- quality
- browser
- release_smoke
if: github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main' && inputs.deploy == true
uses: ./.github/workflows/deploy-web.yml
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/nightly-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ name: Nightly Release Cron

on:
schedule:
# 06:00 ET daily; skips when main has not moved since the newest release.
- cron: "0 10 * * *"
# 06:07 ET daily; skips when main has not moved since the newest release.
# Minute 7, not 0: GitHub queues top-of-the-hour crons the longest (ours
# started 14-22 minutes late).
- cron: "7 10 * * *"
workflow_dispatch:

permissions:
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ permissions:

concurrency:
group: desktop-release-${{ github.ref }}
cancel-in-progress: true
# Never cancel a publisher mid-run: a second nightly on main queues instead
# of leaving a half-uploaded draft release behind.
cancel-in-progress: false

jobs:
preflight:
Expand Down Expand Up @@ -577,7 +579,6 @@ jobs:
timeout-minutes: 50
strategy:
fail-fast: false
max-parallel: 1
matrix: ${{ fromJSON(needs.preflight.outputs.macos_matrix) }}
steps:
- name: Checkout
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"typecheck": "vp run -r --concurrency-limit 2 --cache typecheck",
"tc": "vp run -r --concurrency-limit 2 --cache typecheck",
"lint": "vp lint --report-unused-disable-directives",
"test": "vp run -r --cache test",
"test": "vp run -r --parallel --concurrency-limit 4 --cache test",
"test:desktop-smoke": "vp run --filter @threadlines/desktop smoke-test",
"fmt": "vp fmt",
"fmt:check": "vp fmt --check",
Expand Down
Loading