Skip to content

Commit

Permalink
ci: exercise our tests and scripts on Windows too
Browse files Browse the repository at this point in the history
This is more expensive, though, and not critical, so we don't want to
run these tests on every push in every PR, only on the actual push to
main.

Known limitation: "npx nx bundle web-component" only works in Git Bash on
Windows, not in cmd or PowerShell, so don't exercise it here, it'll just
fail every time.

Second limitation: we end up installing stuff twice, once for Cypress,
once for the rest of the processes. I'm not sure how to avoid that.
I leave it as future work to optimize this out.
  • Loading branch information
joanise committed Jun 28, 2024
1 parent 632f56f commit 35a2db4
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/windows-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Run tests on Windows
on:
push:
branches:
- main
jobs:
tests-on-windows:
runs-on: windows-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm install --verbose
- name: Ng test for studio-web
run: |
npx nx build web-component
npx nx test:once studio-web
- name: Cypress run for web-component
uses: cypress-io/github-action@v6
with:
install: true # fails on Windows with install: false
start: |
npx nx serve web-component
npx nx serve-test-data web-component
wait-on: "http://localhost:3333/build/web-component.esm.js"
command: npx nx test:once web-component

- run: npx nx extract-i18n studio-web
- run: npx nx check-l10n studio-web
- run: npx nx build ngx-web-component
- run: npx nx build studio-web

# bundle only works in Git Bash on Windows, so don't exercise it here, we know it'll fail.
#- run: npx nx bundle web-component
# shell: bash
# continue-on-error: true

0 comments on commit 35a2db4

Please sign in to comment.