mirror of
https://github.com/openpgpjs/openpgpjs.git
synced 2026-03-07 01:21:35 +00:00
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:
13
.github/workflows/tests.yml
vendored
13
.github/workflows/tests.yml
vendored
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user