Merge pull request #1714 from laststance/codex/add-browser-security-e… #3363
This file contains hidden or 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: Chrome E2E Tests | |
| on: | |
| push: | |
| branches: [main, master] | |
| pull_request: | |
| branches: [main, master] | |
| jobs: | |
| chrome-e2e-test: | |
| timeout-minutes: 60 | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| - name: Install dependencies | |
| run: npm install -g pnpm && pnpm install | |
| - run: | | |
| touch .env | |
| echo "NEXT_PUBLIC_SITE_URL=${{ secrets.NEXT_PUBLIC_SITE_URL }}" >> .env | |
| echo "PERSONAL_ACCESS_TOKEN=${{ secrets.PERSONAL_ACCESS_TOKEN }}" >> .env | |
| echo "ARGOS_TOKEN=${{ secrets.ARGOS_TOKEN }}" >> .env | |
| - name: Build Next | |
| run: pnpm build | |
| - name: Install Playwright Browsers | |
| run: pnpm exec playwright install --with-deps | |
| - name: Set build name | |
| run: echo "BUILD_NAME=Chrome" >> .env | |
| - name: Set Argos upload flag based on actor | |
| run: | | |
| if [[ "${{ github.actor }}" == "dependabot[bot]" ]]; then | |
| echo "UPLOAD_TO_ARGOS=false" >> .env | |
| else | |
| echo "UPLOAD_TO_ARGOS=true" >> .env | |
| fi | |
| - name: Playwright tests | |
| run: pnpm exec playwright test --project='Chrome' | |
| - uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: playwright-report | |
| path: playwright-report/ | |
| retention-days: 30 |