Test external integrations #2630
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: Test external integrations | |
on: | |
schedule: | |
- cron: '47 3,15 * * *' | |
jobs: | |
test-external-integrations: | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
# Custom cache as we do not care about installing all the other dependancies | |
with: | |
path: | | |
~/.cache/Cypress | |
node_modules | |
key: cypress-cache-${{ runner.os }}-${{ hashFiles('package-lock.json', 'package.json') }} | |
- uses: ./.github/actions/install | |
- name: Test external integration | |
uses: cypress-io/github-action@v5 | |
with: | |
install: false | |
working-directory: site | |
record: true | |
tag: external-integration | |
config: specPattern=cypress/integration/external/**/*.{js,jsx,ts,tsx},baseUrl=https://mon-entreprise.urssaf.fr | |
- name: e2e tests with external API calls | |
uses: cypress-io/github-action@v5 | |
with: | |
install: false | |
working-directory: site | |
# List here all the specs that are making external API calls: | |
spec: | | |
cypress/integration/mon-entreprise/demande-mobilité.ts | |
record: true | |
tag: external-mon-entreprise-e2e | |
config: specPattern=cypress/integration/mon-entreprise/**/*.{js,jsx,ts,tsx},baseUrl=https://mon-entreprise.urssaf.fr | |
env: language=fr,record_http= # prevent stubbing |