Skip to content

Commit 33eca49

Browse files
committed
Test the build setup on Windows in CI too
We don't deploy on Windows, but this is useful to ensure the development setup works correctly for contributors (it was broken recently). We don't bother with the integration tests, since contributors won't usually need these and they're a bit more complicated (requires launching & managing the server backend).
1 parent a1c6852 commit 33eca49

File tree

1 file changed

+28
-1
lines changed

1 file changed

+28
-1
lines changed

.github/workflows/ci.yml

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,38 @@ jobs:
4848
path: dist/*
4949
if-no-files-found: error
5050

51+
# We build in parallel on Windows too, purely to check the build process is cross-compatible for contributors.
52+
test-windows-build:
53+
name: Test build on Windows
54+
runs-on: windows-latest
55+
steps:
56+
- uses: actions/checkout@v4
57+
with:
58+
fetch-depth: 100
59+
60+
# Install Node
61+
- uses: actions/setup-node@v4
62+
with:
63+
node-version: 20.8.0
64+
cache: 'npm'
65+
66+
# Install & unit test & build
67+
- run: npm ci
68+
69+
- run: npm run test:unit
70+
71+
# Build the app:
72+
- name: Test a production build
73+
run: npm run build
74+
if: github.ref != 'refs/heads/main'
75+
env:
76+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # To pull server without rate limit issues in CI
77+
5178
publish-netlify:
5279
name: Deploy ${{ (github.ref == 'refs/heads/main' && 'to Netlify production') || 'Netlify preview' }}
5380
if: github.event_name == 'push'
5481
runs-on: ubuntu-latest
55-
needs: build
82+
needs: [build, test-windows-build]
5683
steps:
5784
- uses: actions/checkout@v4
5885

0 commit comments

Comments
 (0)