fix/cypress #611
Workflow file for this run
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: Integration Tests | |
| on: | |
| merge_group: | |
| workflow_dispatch: | |
| pull_request: | |
| types: | |
| - opened | |
| - synchronize | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
| env: | |
| NODE_VERSION: 18 | |
| jobs: | |
| test-examples: | |
| name: Run example tests | |
| runs-on: ubuntu-latest | |
| env: | |
| TERM: xterm | |
| SKIP_PREFLIGHT_CHECK: true | |
| CYPRESS_USER_EMAIL: ${{secrets.CYPRESS_USER_EMAIL}} | |
| CYPRESS_USER_PASSWORD: ${{secrets.CYPRESS_USER_PASSWORD}} | |
| REACT_APP_DOMAIN: ${{secrets.TEST_DOMAIN}} | |
| REACT_APP_CLIENT_ID: ${{secrets.TEST_CLIENT_ID}} | |
| REACT_APP_AUDIENCE: ${{secrets.TEST_AUDIENCE}} | |
| GATSBY_DOMAIN: ${{secrets.TEST_DOMAIN}} | |
| GATSBY_CLIENT_ID: ${{secrets.TEST_CLIENT_ID}} | |
| GATSBY_AUDIENCE: ${{secrets.TEST_AUDIENCE}} | |
| NEXT_PUBLIC_DOMAIN: ${{secrets.TEST_DOMAIN}} | |
| NEXT_PUBLIC_CLIENT_ID: ${{secrets.TEST_CLIENT_ID}} | |
| NEXT_PUBLIC_AUDIENCE: ${{secrets.TEST_AUDIENCE}} | |
| DOMAIN: ${{secrets.TEST_DOMAIN}} | |
| AUDIENCE: ${{secrets.TEST_AUDIENCE}} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Debug - Check if secrets are loaded | |
| run: | | |
| echo "Checking if CYPRESS_USER_EMAIL is set..." | |
| if [ -z "$CYPRESS_USER_EMAIL" ]; then | |
| echo "❌ CYPRESS_USER_EMAIL is NOT set or empty" | |
| exit 1 | |
| else | |
| echo "✅ CYPRESS_USER_EMAIL is set (value: ${CYPRESS_USER_EMAIL:0:3}***@***)" | |
| fi | |
| echo "Checking if CYPRESS_USER_PASSWORD is set..." | |
| if [ -z "$CYPRESS_USER_PASSWORD" ]; then | |
| echo "❌ CYPRESS_USER_PASSWORD is NOT set or empty" | |
| exit 1 | |
| else | |
| echo "✅ CYPRESS_USER_PASSWORD is set (length: ${#CYPRESS_USER_PASSWORD} characters)" | |
| fi | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build SDK | |
| run: npm run build | |
| - name: Install examples | |
| run: npm run install:examples | |
| - name: Run integration test (CRA) | |
| run: | | |
| CYPRESS_USER_EMAIL="${{secrets.CYPRESS_USER_EMAIL}}" \ | |
| CYPRESS_USER_PASSWORD="${{secrets.CYPRESS_USER_PASSWORD}}" \ | |
| npm run test:cra | |
| continue-on-error: true | |
| - name: Upload CRA test artifacts | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: cra-test-results | |
| path: | | |
| cypress/screenshots/ | |
| retention-days: 30 | |
| - name: Run integration test (NextJS) | |
| run: npm run test:nextjs | |
| - name: Run integration test (Gatsby) | |
| run: npm run test:gatsby |