🔧 Améliore le hook useGetCurrentSimulation #971
Workflow file for this run
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: Cypress Tests | |
on: | |
push: | |
branches: | |
- 'master' | |
pull_request: | |
types: | |
- opened | |
- reopened | |
- synchronize | |
- ready_for_review | |
jobs: | |
sleep: | |
name: If first run wait 3 min for the Netlify preview to be deployed | |
runs-on: ubuntu-latest | |
steps: | |
- name: Sleep for 2 min | |
run: sleep 2m | |
shell: bash | |
e2e: | |
runs-on: ubuntu-latest | |
needs: sleep | |
container: | |
image: cypress/browsers:node18.12.0-chrome107 | |
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 e2e in worker ${{ matrix.containers }} | |
if: github.event.pull_request.draft == false | |
steps: | |
- name: Checkout repository | |
uses: actions/[email protected] | |
with: | |
submodules: recursive | |
- name: Get current PR number | |
uses: jwalton/gh-find-current-pr@v1 | |
id: current-pr | |
- name: Setup baseUrl to deploy-preview | |
if: ${{ success() && steps.current-pr.outputs.number }} | |
run: | | |
echo "CYPRESS_baseUrl=https://deploy-preview-${{ steps.current-pr.outputs.pr }}--nosgestesclimat.netlify.app" >> "$GITHUB_ENV"; | |
echo "MODE=preview" >> "$GITHUB_ENV"; | |
- name: Setup baseUrl to nosgestesclimat.fr | |
if: ${{ !success() || !steps.current-pr.outputs.number }} | |
run: | | |
echo "CYPRESS_baseUrl=https://nosgestesclimat.fr" >> "$GITHUB_ENV" | |
echo "MODE=production" >> "$GITHUB_ENV" | |
- name: Test - e2e [${{ env.MODE }}] | |
uses: cypress-io/[email protected] | |
with: | |
build: yarn run e2e:generate:personas | |
browser: chrome | |
parallel: true | |
record: true | |
group: 'Test - e2e' | |
spec: cypress/e2e/**/*.cy.js | |
env: | |
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} | |
GITHUB_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }} |