|
| 1 | +name: Auth-React Tests - L1 - Fastapi |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + types: |
| 6 | + - opened |
| 7 | + - reopened |
| 8 | + - synchronize |
| 9 | + push: |
| 10 | + branches: |
| 11 | + - master |
| 12 | + - "v[0-9]+.[0-9]+" |
| 13 | + tags: |
| 14 | + - "(dev-)?v[0-9]+.[0-9]+.[0-9]+" |
| 15 | + |
| 16 | +jobs: |
| 17 | + define-versions: |
| 18 | + runs-on: ubuntu-latest |
| 19 | + outputs: |
| 20 | + fdiVersions: ${{ steps.versions.outputs.fdiVersions }} |
| 21 | + cdiVersions: ${{ steps.versions.outputs.cdiVersions }} |
| 22 | + pyVersions: '["3.8", "3.13"]' |
| 23 | + steps: |
| 24 | + - uses: actions/checkout@v4 |
| 25 | + - uses: supertokens/get-supported-versions-action@main |
| 26 | + id: versions |
| 27 | + with: |
| 28 | + has-fdi: true |
| 29 | + has-cdi: true |
| 30 | + |
| 31 | + setup-auth-react: |
| 32 | + runs-on: ubuntu-latest |
| 33 | + needs: define-versions |
| 34 | + strategy: |
| 35 | + fail-fast: false |
| 36 | + matrix: |
| 37 | + fdi-version: ${{ fromJSON(needs.define-versions.outputs.fdiVersions) }} |
| 38 | + |
| 39 | + outputs: |
| 40 | + AUTH_REACT__LOG_DIR: ${{ steps.envs.outputs.AUTH_REACT__LOG_DIR }} |
| 41 | + AUTH_REACT__SCREENSHOT_DIR: ${{ steps.envs.outputs.AUTH_REACT__SCREENSHOT_DIR }} |
| 42 | + AUTH_REACT__APP_SERVER: ${{ steps.envs.outputs.AUTH_REACT__APP_SERVER }} |
| 43 | + AUTH_REACT__NODE_PORT: ${{ steps.envs.outputs.AUTH_REACT__NODE_PORT }} |
| 44 | + AUTH_REACT__TEST_MODE: ${{ steps.envs.outputs.AUTH_REACT__TEST_MODE }} |
| 45 | + AUTH_REACT__PORT: ${{ steps.envs.outputs.AUTH_REACT__PORT }} |
| 46 | + specs: ${{ steps.envs.outputs.specs }} |
| 47 | + matrix: ${{ steps.setup-matrix.outputs.matrix }} |
| 48 | + |
| 49 | + steps: |
| 50 | + - uses: supertokens/get-versions-action@main |
| 51 | + id: versions |
| 52 | + with: |
| 53 | + driver-name: python |
| 54 | + fdi-version: ${{ matrix.fdi-version }} |
| 55 | + env: |
| 56 | + SUPERTOKENS_API_KEY: ${{ secrets.SUPERTOKENS_API_KEY }} |
| 57 | + |
| 58 | + - uses: supertokens/auth-react-testing-action/setup@main |
| 59 | + id: envs |
| 60 | + with: |
| 61 | + # auth-react-version: ${{ steps.versions.outputs.authReactVersionXy }} |
| 62 | + auth-react-version: ci/github-actions/auth-react/v${{ steps.versions.outputs.authReactVersionXy }}.0 |
| 63 | + node-sdk-version: ${{ steps.versions.outputs.nodeTag }} |
| 64 | + fdi-version: ${{ matrix.fdi-version }} |
| 65 | + |
| 66 | + - id: setup-matrix |
| 67 | + uses: supertokens/extended-matrix-action@main |
| 68 | + with: |
| 69 | + artifact-id: ${{ matrix.fdi-version }} |
| 70 | + matrix: | |
| 71 | + py-version: ${{ needs.define-versions.outputs.pyVersions }} |
| 72 | + framework: ["fastapi"] |
| 73 | + spec: ${{ steps.envs.outputs.specs }} |
| 74 | +
|
| 75 | + launch-fdi-workflows: |
| 76 | + uses: ./.github/workflows/auth-react-test-2.yml |
| 77 | + needs: |
| 78 | + - define-versions |
| 79 | + - setup-auth-react |
| 80 | + strategy: |
| 81 | + max-parallel: 1 # This is important to avoid ddos GHA API |
| 82 | + fail-fast: false # Don't fail fast to avoid locking TF State |
| 83 | + matrix: |
| 84 | + fdi-version: ${{ fromJSON(needs.define-versions.outputs.fdiVersions) }} |
| 85 | + name: FDI ${{ matrix.fdi-version }} |
| 86 | + with: |
| 87 | + artifact-id: ${{ matrix.fdi-version }} |
| 88 | + AUTH_REACT__LOG_DIR: ${{ needs.setup-auth-react.outputs.AUTH_REACT__LOG_DIR }} |
| 89 | + AUTH_REACT__SCREENSHOT_DIR: ${{ needs.setup-auth-react.outputs.AUTH_REACT__SCREENSHOT_DIR }} |
| 90 | + AUTH_REACT__APP_SERVER: ${{ needs.setup-auth-react.outputs.AUTH_REACT__APP_SERVER }} |
| 91 | + AUTH_REACT__NODE_PORT: ${{ needs.setup-auth-react.outputs.AUTH_REACT__NODE_PORT }} |
| 92 | + AUTH_REACT__TEST_MODE: ${{ needs.setup-auth-react.outputs.AUTH_REACT__TEST_MODE }} |
| 93 | + AUTH_REACT__PORT: ${{ needs.setup-auth-react.outputs.AUTH_REACT__PORT }} |
0 commit comments