Bump next from 15.4.9 to 15.4.10 in /playground/connect-next #109
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: Test on React | |
| env: | |
| BRANCH_NAME_RAW: ${{ github.head_ref || github.ref_name }} | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - develop | |
| jobs: | |
| test: | |
| timeout-minutes: 60 | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - testType: complete | |
| configFile: playwright.config.complete.ts | |
| - testType: connect | |
| configFile: playwright.config.connect.ts | |
| env: | |
| PLAYWRIGHT_NUM_CORES: 4 | |
| PLAYWRIGHT_TEST_URL: ${{ secrets.PLAYWRIGHT_TEST_URL }} | |
| PLAYWRIGHT_JWT_TOKEN: ${{ secrets.PLAYWRIGHT_JWT_TOKEN }} | |
| PLAYWRIGHT_GOOGLE_EMAIL: ${{ secrets.PLAYWRIGHT_GOOGLE_EMAIL }} | |
| PLAYWRIGHT_GOOGLE_PASSWORD: ${{ secrets.PLAYWRIGHT_GOOGLE_PASSWORD }} | |
| PLAYWRIGHT_GOOGLE_TOTP_SECRET: ${{ secrets.PLAYWRIGHT_GOOGLE_TOTP_SECRET }} | |
| NEXT_PUBLIC_CORBADO_PROJECT_ID: ${{ secrets.NEXT_PUBLIC_CORBADO_PROJECT_ID }} | |
| NEXT_PUBLIC_CORBADO_FRONTEND_API_URL_SUFFIX: ${{ secrets.NEXT_PUBLIC_CORBADO_FRONTEND_API_URL_SUFFIX }} | |
| CORBADO_BACKEND_API_URL: ${{ secrets.CORBADO_BACKEND_API_URL }} | |
| CORBADO_BACKEND_API_BASIC_AUTH: ${{ secrets.CORBADO_BACKEND_API_BASIC_AUTH }} | |
| PLAYWRIGHT_CONNECT_PROJECT_ID: ${{ secrets.PLAYWRIGHT_CONNECT_PROJECT_ID }} | |
| PLAYWRIGHT_NGROK_AUTH_TOKEN: ${{ secrets.PLAYWRIGHT_NGROK_AUTH_TOKEN }} | |
| AWS_COGNITO_USER_POOL_ID: ${{ secrets.AWS_COGNITO_USER_POOL_ID }} | |
| NEXT_PUBLIC_AWS_COGNITO_USER_POOL_ID: ${{ secrets.AWS_COGNITO_USER_POOL_ID }} | |
| AWS_COGNITO_CLIENT_ID: ${{ secrets.AWS_COGNITO_CLIENT_ID }} | |
| NEXT_PUBLIC_AWS_COGNITO_CLIENT_ID: ${{ vars.NEXT_PUBLIC_AWS_COGNITO_CLIENT_ID }} | |
| AWS_COGNITO_CLIENT_SECRET: ${{ secrets.AWS_COGNITO_CLIENT_SECRET }} | |
| AWS_REGION: ${{ secrets.AWS_REGION }} | |
| AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID_CONNECT_PLAYGROUND }} | |
| AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY_CONNECT_PLAYGROUND }} | |
| GITHUB_RUN_ID: ${{ github.run_id }} | |
| SLACK_BOT_USER_OAUTH_TOKEN: ${{ secrets.SLACK_BOT_USER_OAUTH_TOKEN }} | |
| GITHUB_BRANCH_NAME: ${{ github.ref_name }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| - name: Cache node modules | |
| id: cache-npm | |
| uses: actions/cache@v3 | |
| env: | |
| cache-name: cache-node-modules | |
| with: | |
| path: | | |
| ~/.npm | |
| ./node_modules | |
| key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}-force-1 | |
| restore-keys: | | |
| ${{ runner.os }}-build-${{ env.cache-name }}- | |
| ${{ runner.os }}-build- | |
| ${{ runner.os }}- | |
| - if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }} | |
| name: Install root dependencies | |
| run: | | |
| npm i | |
| npm install lerna | |
| npm install [email protected] | |
| npm list | |
| - name: Build SDKs | |
| run: | | |
| npm run build | |
| npm run build:bundler:local | |
| - name: Get installed Playwright version | |
| id: playwright-version | |
| run: echo "::set-output name=version::$(yarn why --json @playwright/test | grep -h 'workspace:.' | jq --raw-output '.children[].locator' | sed -e 's/@playwright\/test@.*://')" | |
| - if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }} | |
| name: List the state of node modules | |
| continue-on-error: true | |
| run: | | |
| cd packages/tests-e2e | |
| npm list | |
| - name: Install dependencies | |
| run: | | |
| cd packages/tests-e2e | |
| npm install | |
| sudo apt-get update | |
| sudo apt-get install -y libxml2-utils | |
| - uses: actions/cache@v3 | |
| id: playwright-cache | |
| with: | |
| path: '~/.cache/ms-playwright' | |
| key: '${{ runner.os }}-playwright-${{ steps.playwright-version.outputs.version }}' | |
| restore-keys: | | |
| ${{ runner.os }}-playwright- | |
| - name: Install Playwright's dependencies | |
| if: steps.playwright-cache.outputs.cache-hit != 'true' | |
| run: | | |
| cd packages/tests-e2e | |
| npx playwright install --with-deps | |
| - name: Create a log stream on AWS CloudWatch | |
| env: | |
| AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| AWS_REGION: ${{ secrets.AWS_REGION }} | |
| run: | | |
| TIMESTAMP=$(date +%s000) | |
| RANDOM_SUFFIX=$(head /dev/urandom | tr -dc a-z0-9 | head -c 6) | |
| LOG_STREAM_NAME="javascript-${TIMESTAMP}-${RANDOM_SUFFIX}" | |
| echo "LOG_STREAM_NAME=$LOG_STREAM_NAME" >> $GITHUB_ENV | |
| aws logs create-log-stream --log-group-name "test-results-board" --log-stream-name "$LOG_STREAM_NAME" | |
| - name: Run ${{ matrix.testType }} tests for react | |
| working-directory: packages/tests-e2e | |
| run: | | |
| npx playwright test --config=${{ matrix.configFile }} | |
| - uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: playwright-report-${{ matrix.testType }}-react | |
| path: packages/tests-e2e/playwright-report/ | |
| retention-days: 30 | |
| - name: Send logs to AWS CloudWatch | |
| if: always() | |
| env: | |
| AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| AWS_REGION: ${{ secrets.AWS_REGION }} | |
| run: | | |
| cd packages/tests-e2e | |
| TESTS=$(xmllint --xpath 'string(/testsuites/@tests)' test-results/results.xml) | |
| FAILURES=$(xmllint --xpath 'string(/testsuites/@failures)' test-results/results.xml) | |
| SKIPPED=$(xmllint --xpath 'string(/testsuites/@skipped)' test-results/results.xml) | |
| ERRORS=$(xmllint --xpath 'string(/testsuites/@errors)' test-results/results.xml) | |
| TIME=$(xmllint --xpath 'string(/testsuites/@time)' test-results/results.xml) | |
| PASSED=$((TESTS - FAILURES - ERRORS - SKIPPED)) | |
| FAILED=$((FAILURES + ERRORS)) | |
| TIMESTAMP=$(date +%s000) | |
| LOG_EVENT_JSON="[{\"timestamp\":$TIMESTAMP,\"message\":\"{\\\"application\\\":\\\"${{ matrix.testType }}\\\",\\\"platform\\\":\\\"react\\\",\\\"run_type\\\":\\\"commitly\\\",\\\"execution_time\\\":$TIME,\\\"passed\\\":$PASSED,\\\"failed\\\":$FAILED,\\\"link\\\":\\\"https://github.com/corbado/javascript/actions/runs/${GITHUB_RUN_ID}\\\"}\"}]" | |
| aws logs put-log-events --log-group-name "test-results-board" --log-stream-name "$LOG_STREAM_NAME" --log-events "$LOG_EVENT_JSON" |