add a 'test-firefox-ci' target to playwright's package.json, and configure

github to run it for a pull request if a "[Tt]est Firefox" label is present
This commit is contained in:
Brent Baccala 2022-08-15 18:04:42 -04:00
parent 14d80b4e29
commit 19ce4c38ae
2 changed files with 18 additions and 2 deletions

View File

@ -133,6 +133,21 @@ jobs:
BBB_URL: https://bbb-ci.test/bigbluebutton/api
BBB_SECRET: bbbci
run: npm run test-ci
- name: Run Firefox tests
working-directory: ./bigbluebutton-tests/playwright
if: ${{ contains(github.event.pull_request.labels.*.name, 'test Firefox')
|| contains(github.event.pull_request.labels.*.name, 'Test Firefox') }}
env:
NODE_EXTRA_CA_CERTS: /usr/local/share/ca-certificates/bbb-dev/bbb-dev-ca.crt
ACTIONS_RUNNER_DEBUG: true
BBB_URL: https://bbb-ci.test/bigbluebutton/api
BBB_SECRET: bbbci
# patch playwright's firefox so that it uses the system's root certificate authority
run: |
sh -c '
find $HOME/.cache/ms-playwright -name libnssckbi.so -exec rm {} \; -exec ln -s /usr/lib/x86_64-linux-gnu/pkcs11/p11-kit-trust.so {} \;
npm run test-firefox-ci
'
- if: always()
uses: actions/upload-artifact@v3
with:

View File

@ -4,7 +4,8 @@
"test:filter": "npx playwright test -g",
"test:headed": "npx playwright test --headed",
"test:debug": "npx playwright test --debug -g",
"test-ci": "export CI='true' && npx playwright test --project=chromium --grep @ci"
"test-ci": "export CI='true' && npx playwright test --project=chromium --grep @ci",
"test-firefox-ci": "export CI='true' && npx playwright test --project=firefox --grep @ci"
},
"dependencies": {
"@playwright/test": "^1.19.2",
@ -13,4 +14,4 @@
"dotenv": "^16.0.0",
"sha1": "^1.1.1"
}
}
}