🔧 Update Sentry config to get proper sourcemapping #334
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: Snapshots Cypress Tests | |
on: | |
pull_request: | |
types: | |
- opened | |
- reopened | |
- synchronize | |
branches: | |
- main | |
jobs: | |
sleep: | |
name: Wait 3 min for the Vercel preview to be deployed | |
runs-on: ubuntu-latest | |
steps: | |
- name: Sleep for 90s | |
run: sleep 90s | |
shell: bash | |
snapshots: | |
runs-on: ubuntu-latest | |
needs: sleep | |
container: | |
image: cypress/browsers:latest | |
options: --user 1001 | |
strategy: | |
fail-fast: false | |
matrix: | |
containers: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] | |
name: Testing snapshots in worker ${{ matrix.containers }} | |
if: github.event.pull_request.draft == false | |
steps: | |
- name: Checkout repository | |
uses: actions/[email protected] | |
- name: Get branch name | |
id: branch-name | |
uses: tj-actions/branch-names@v7 | |
- name: Setup baseUrl to deploy-preview | |
if: ${{ success() && steps.branch-name.outputs.is_default == 'false' }} | |
run: | | |
echo "CYPRESS_baseUrl=https://nosgestesclimat-git-${{ steps.branch-name.outputs.current_branch }}-ademe.vercel.app" >> "$GITHUB_ENV"; | |
echo "MODE=preview" >> "$GITHUB_ENV"; | |
- name: Setup baseUrl to https://nosgestesclimat.vercel.app | |
if: ${{ !success() || steps.branch-name.outputs.is_default == 'true' }} | |
run: | | |
echo "CYPRESS_baseUrl=https://nosgestesclimat.vercel.app" >> "$GITHUB_ENV" | |
echo "MODE=production" >> "$GITHUB_ENV" | |
- name: Test - snapshots [${{ env.MODE }}] | |
uses: cypress-io/[email protected] | |
with: | |
install: true | |
browser: chrome | |
parallel: true | |
record: true | |
group: 'Test - snapshots' | |
spec: cypress/e2e/snapshots/**/*.cy.js | |
env: | |
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} | |
GITHUB_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }} |