-
Notifications
You must be signed in to change notification settings - Fork 0
119 lines (102 loc) · 4.6 KB
/
Copy pathsolid-matrix.yml
File metadata and controls
119 lines (102 loc) · 4.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
name: Solid 1.8 + 1.9 Matrix
# Per-target CI for the Solid compile target.
#
# The cross-framework matrix workflows previously covered only
# React/Vue/Svelte/Angular — the "core four". Solid and Lit shipped later as
# targets 5 and 6 and never got dedicated workflows, leaving their per-target
# unit suites and consumer demos CI-dark: only the Visual Regression matrix
# (which renders all six targets) exercised them at all.
#
# This workflow closes the Solid half of that gap. It mirrors
# svelte-matrix.yml: build the workspace, run the Solid target + runtime +
# unplugin unit suites, then build the solid-vite demo and run its Playwright
# e2e against both supported solid-js lines.
#
# Matrix: solid-js 1.8 (runtime-solid's declared peer-dep floor) + 1.9 (the
# line the demo and @rozie/target-solid pin). Single Vite — the demo pins
# vite ^6 and vite-plugin-solid 2.11 drives the JSX transform; a Vite-version
# axis is deferred (Solid breakage does not live there).
#
# `push: [main]` runs on every push (no path filter) so a `packages/core/**`
# emitter change always re-exercises Solid even when nothing under
# packages/targets/solid changed — the drift the matrix is here to catch.
on:
pull_request:
paths:
- 'packages/targets/solid/**'
- 'packages/runtime/solid/**'
- 'packages/unplugin/**'
- 'packages/core/**'
- 'examples/consumers/solid-vite/**'
- '.github/workflows/solid-matrix.yml'
push:
branches: [main]
jobs:
solid-matrix:
runs-on: ubuntu-latest
timeout-minutes: 25
strategy:
fail-fast: false
matrix:
solid-version: ['1.8', '1.9']
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v6
- uses: actions/setup-node@v6
with:
node-version: 20
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Cache turbo build output
uses: actions/cache@v5
with:
path: .turbo
key: ${{ runner.os }}-turbo-${{ github.job }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-turbo-${{ github.job }}-
${{ runner.os }}-turbo-
# Build the whole workspace via turbo. The swipe canary's emit tests
# import every target's dist/ and the dts-identity test reads every
# target's dist/index.d.mts — so all 6 targets must be built even on a
# Solid-only CI run.
#
# Phase 22 / REQ-6: `turbo run build` includes `solid-vite-demo#build`
# (`vite build`), whose @rozie/unplugin `buildStart` hook emits the
# per-module `<Name>.d.rozie.ts` sidecars. Sidecars are gitignored (REQ-7),
# absent on a fresh checkout — this step generates them BEFORE the
# "Typecheck demo" step, closing the cold-checkout race.
- name: Build all packages (generates .d.rozie.ts sidecars before typecheck — REQ-6)
run: pnpm turbo run build
- name: Run unit tests (core + target-solid + runtime-solid + unplugin)
run: |
pnpm exec vitest run --root packages/core
pnpm exec vitest run --root packages/targets/solid
pnpm exec vitest run --root packages/runtime/solid
pnpm exec vitest run --root packages/unplugin
- name: Override Solid version for the demo
working-directory: examples/consumers/solid-vite
run: pnpm add solid-js@~${{ matrix.solid-version }}
- name: Re-install with version override
run: pnpm install --no-frozen-lockfile
# WR-03: a `.rozie` with no sidecar after the build means buildStart
# silently failed to emit it; --require-complete makes that a hard failure.
- name: Verify every demo .rozie has a fresh sidecar (WR-03)
run: node scripts/check-sidecar-staleness.mjs --require-complete
# REQ-6: the .d.rozie.ts sidecars this consumes were generated by the
# "Build all packages" step above (buildStart hook) — never reorder before it.
- name: Typecheck demo (sidecars generated above — REQ-6)
run: pnpm --filter solid-vite-demo run typecheck
- name: Build demo
run: pnpm --filter solid-vite-demo run build
- name: Install Playwright Chromium
run: pnpm --filter solid-vite-demo run test:e2e:install
- name: Run Playwright e2e tests
run: pnpm --filter solid-vite-demo run test:e2e
- name: Upload Playwright HTML report on failure
if: failure()
uses: actions/upload-artifact@v7
with:
name: playwright-report-solid-${{ matrix.solid-version }}
path: examples/consumers/solid-vite/playwright-report
retention-days: 7