Skip to content

Commit a0dbb8e

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 a0dbb8e

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,6 +48,33 @@ 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'
@@ -82,7 +109,7 @@ jobs:
82109
name: Build & publish container to Docker Hub
83110
if: github.event_name == 'push' && !startsWith(github.ref, 'refs/heads/dependabot/')
84111
runs-on: ubuntu-latest
85-
needs: build
112+
needs: [build, test-windows-build]
86113
steps:
87114
- uses: actions/checkout@v4
88115

0 commit comments

Comments
 (0)