CI: setup HTTPS in web-test-runner for BrowserStack tests

To have tests work Browserstack Safari (also below iOS 15), as the tests are run in an iframe,
rewriting localhost as hostname, making WebCrypto not available.

We keep HTTP for the non-browserstack tests so that in local testing,
generating self-signed certs is not required.
This commit is contained in:
larabr
2024-10-09 17:20:16 +02:00
parent ae5698c621
commit 4ddadd4f53
6 changed files with 305 additions and 63 deletions

View File

@@ -100,12 +100,12 @@ jobs:
run: npx playwright install --with-deps webkit
- name: Run browser tests
run: npm run test-browser -- --static-logging
run: npm run test-browser:ci -- --static-logging
- name: Run browser tests (lightweight) # overwrite test/lib
run: |
npm run build-test --lightweight
npm run test-browser -- --static-logging
npm run test-browser:ci -- --static-logging
test-browsers-compatibility:
name: Browsers (older, on Browserstack)
@@ -119,6 +119,15 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- name: Generate self-signed HTTPS certificates for web-test-runner server
uses: kofemann/action-create-certificate@v0.0.4
with:
hostcert: '127.0.0.1.pem'
hostkey: '127.0.0.1-key.pem'
cachain: 'ca-chain.pem'
- name: Adjust HTTPS certificates permissions
run: sudo chown runner:docker *.pem
- name: Install dependencies
run: npm ci --ignore-scripts