Skip to content

Commit e0b13a7

Browse files
committed
ci: streamline running all the tests
1 parent 3357665 commit e0b13a7

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

.github/workflows/end-to-end-tests.yml

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ on:
66
- push
77
- workflow_call
88
jobs:
9-
web-component-suites:
10-
name: Web-Component tests and utilities verification
9+
run-tests:
10+
name: Web-Component and Studio-web spec tests, utilities verification, etc.
1111
runs-on: ubuntu-latest
1212
# Stop the occasional rogue instance before the 6h GitHub limit
1313
timeout-minutes: 15
@@ -20,8 +20,9 @@ jobs:
2020
uses: actions/setup-node@v4
2121
with:
2222
node-version: 20
23+
2324
- name: Install everything
24-
run: npm install
25+
run: npm ci
2526

2627
- name: Automated license checking
2728
env:
@@ -32,7 +33,7 @@ jobs:
3233
npx license-checker --summary --production --onlyAllow "$PROD_LICENSES" --excludePackages "$OK_BUT_NOT_AUTODETECTED"
3334
npx license-checker --summary --onlyAllow "$DEV_LICENSES;$PROD_LICENSES" --excludePackages "$OK_BUT_NOT_AUTODETECTED"
3435
35-
- name: Cypress run for web-component
36+
- name: Run Cypress tests for web-component
3637
uses: cypress-io/github-action@v6
3738
with:
3839
install: false
@@ -41,11 +42,18 @@ jobs:
4142
npx nx serve-test-data web-component
4243
wait-on: sleep 15 # there is no reliable URL to wait for...
4344
command: npx nx test:once web-component
45+
46+
- name: Ng spec tests for studio-web
47+
run: |
48+
npx nx build web-component
49+
npx nx test:once studio-web
50+
4451
- name: Check that i18n and l10n are up to date
4552
run: |
4653
npx nx extract-i18n studio-web
4754
if diff -w <(git show HEAD:packages/studio-web/src/i18n/messages.json | sort) <(sort < packages/studio-web/src/i18n/messages.json); then echo OK: The i18n database is up to date.; else echo ERROR: The i18n database is out of date.; npx nx check-l10n studio-web || echo ERROR: The l10n databases are also out of date.; false; fi
4855
if npx nx check-l10n studio-web; then echo OK: The l10n databases are up to date.; else echo ERROR: An l10n database is out of date.; false; fi
56+
4957
- name: make sure the WP plugin zip file is in sync
5058
run: |
5159
cd packages/web-component/wordpress-plugin
@@ -54,12 +62,14 @@ jobs:
5462
echo The zipped WordPress plugin packages/web-component/wordpress-plugin/read-along-web-app-loader.zip is out of date.; \
5563
false; \
5664
fi
65+
5766
- name: make sure bundling works
5867
shell: bash
5968
run: |
6069
npx nx bundle web-component
6170
git status
6271
git diff --word-diff=porcelain --word-diff-regex=... --color | perl -ple 's/^(\x1b[^ -+]{0,6})? (.{81,})$/$1 . " " . substr($2, 0, 40) . " [... " . (length($2)-80) . " bytes ...] " . substr($2, -40)/ex'
72+
6373
studio-e2e-tests:
6474
name: Studio Web test-suites
6575
timeout-minutes: 60
@@ -83,13 +93,7 @@ jobs:
8393
# wait for the API to be up
8494
curl --retry 20 --retry-delay 1 --retry-all-errors http://localhost:8000/api/v1/langs
8595
- name: Install everything
86-
run: npm install
87-
- name: Install dependencies
8896
run: npm ci
89-
- name: Ng test for studio-web
90-
run: |
91-
npx nx build web-component
92-
npx nx test:once studio-web
9397
- name: Run studio-web in the background
9498
run: |
9599
npx nx build web-component
@@ -109,6 +113,7 @@ jobs:
109113
name: blob-report-${{ matrix.shardIndex }}
110114
path: packages/studio-web/blob-report
111115
retention-days: 1
116+
112117
merge-reports:
113118
# Merge reports after playwright-tests, even if some shards have failed
114119
if: ${{ !cancelled() }}
@@ -121,8 +126,6 @@ jobs:
121126
with:
122127
node-version: lts/*
123128
- name: Install everything
124-
run: npm install
125-
- name: Install dependencies
126129
run: npm ci
127130
- name: Install playwright
128131
run: npx playwright install

0 commit comments

Comments
 (0)