fix: Modify logic around top level opt in checks #3779
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: TestCafe | |
on: [pull_request] | |
env: | |
BROWSERSTACK_ACCESS_KEY: "${{ secrets.BROWSERSTACK_ACCESS_KEY }}" | |
BROWSERSTACK_USERNAME: "${{ secrets.BROWSERSTACK_USERNAME }}" | |
POSTHOG_PROJECT_KEY: "${{ secrets.POSTHOG_PROJECT_KEY }}" | |
POSTHOG_API_KEY: "${{ secrets.POSTHOG_API_KEY }}" | |
BROWSERSTACK_DEBUG: 'true' | |
BROWSERSTACK_NETWORK_LOGS: 'true' | |
BROWSERSTACK_CONSOLE: 'info' | |
BROWSERSTACK_FORCE_PROXY: 'true' | |
BROWSERSTACK_USE_AUTOMATE: 'true' | |
BROWSERSTACK_PROJECT_NAME: 'PostHog JS SDK' | |
jobs: | |
browsers: | |
name: Test on ${{ matrix.name }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
browser: | |
- 'chrome:headless' | |
- 'firefox:headless' | |
- 'browserstack:ie' | |
- 'browserstack:safari' | |
include: | |
- browser: 'chrome:headless' | |
name: Chrome | |
- browser: 'firefox:headless' | |
name: Firefox | |
- browser: 'browserstack:ie' | |
name: IE11 | |
- browser: 'browserstack:safari' | |
name: Safari | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: 8.x.x | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '18' | |
cache: 'pnpm' | |
- name: Serve static files | |
run: python -m http.server 8080 & | |
- name: Install node dependencies | |
run: pnpm install | |
- name: Set up posthog-js | |
run: pnpm build-rollup | |
- name: Run ${{ matrix.name }} test | |
timeout-minutes: 10 | |
env: | |
BRANCH_NAME: ${{ github.head_ref || github.ref_name }} | |
RUN_ID: ${{ github.run_id }} | |
BROWSER: ${{ matrix.browser }} | |
run: pnpm testcafe ${{ matrix.browser }} --stop-on-first-fail | |
- name: Check ${{ matrix.name }} events | |
timeout-minutes: 10 | |
run: pnpm check-testcafe-results |