|
| 1 | +name: Platform Tests (Netlify) |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + inputs: |
| 6 | + sha: |
| 7 | + description: 'Commit SHA to test' |
| 8 | + required: false |
| 9 | + default: '' |
| 10 | + workflow_call: |
| 11 | + inputs: |
| 12 | + sha: |
| 13 | + description: 'Commit SHA to test' |
| 14 | + required: false |
| 15 | + type: string |
| 16 | + default: '' |
| 17 | + |
| 18 | +permissions: |
| 19 | + contents: read |
| 20 | + |
| 21 | +env: |
| 22 | + PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: '1' |
| 23 | + |
| 24 | +jobs: |
| 25 | + test-basic: |
| 26 | + if: github.repository == 'sveltejs/kit' |
| 27 | + runs-on: ubuntu-latest |
| 28 | + timeout-minutes: 15 |
| 29 | + environment: '@sveltejs/adapter-netlify platform tests' |
| 30 | + env: |
| 31 | + TEST_APP_DIR: packages/adapter-netlify/test/apps/basic |
| 32 | + steps: |
| 33 | + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 |
| 34 | + with: |
| 35 | + ref: ${{ inputs.sha || github.sha }} |
| 36 | + |
| 37 | + - uses: ./.github/actions/netlify-deploy |
| 38 | + id: deploy |
| 39 | + with: |
| 40 | + test-app-dir: ${{ env.TEST_APP_DIR }} |
| 41 | + netlify-project-id: ${{ secrets.NETLIFY_PROJECT_ID_BASIC }} |
| 42 | + netlify-token: ${{ secrets.NETLIFY_TOKEN }} |
| 43 | + |
| 44 | + - uses: ./.github/actions/platform-test |
| 45 | + with: |
| 46 | + test-app-dir: ${{ env.TEST_APP_DIR }} |
| 47 | + deployment-url: ${{ steps.deploy.outputs.deployment-url }} |
| 48 | + |
| 49 | + test-edge: |
| 50 | + if: github.repository == 'sveltejs/kit' |
| 51 | + runs-on: ubuntu-latest |
| 52 | + timeout-minutes: 15 |
| 53 | + environment: '@sveltejs/adapter-netlify platform tests' |
| 54 | + env: |
| 55 | + TEST_APP_DIR: packages/adapter-netlify/test/apps/edge |
| 56 | + steps: |
| 57 | + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 |
| 58 | + with: |
| 59 | + ref: ${{ inputs.sha || github.sha }} |
| 60 | + |
| 61 | + - uses: ./.github/actions/netlify-deploy |
| 62 | + id: deploy |
| 63 | + with: |
| 64 | + test-app-dir: ${{ env.TEST_APP_DIR }} |
| 65 | + netlify-project-id: ${{ secrets.NETLIFY_PROJECT_ID_EDGE }} |
| 66 | + netlify-token: ${{ secrets.NETLIFY_TOKEN }} |
| 67 | + |
| 68 | + - uses: ./.github/actions/platform-test |
| 69 | + with: |
| 70 | + test-app-dir: ${{ env.TEST_APP_DIR }} |
| 71 | + deployment-url: ${{ steps.deploy.outputs.deployment-url }} |
| 72 | + |
| 73 | + test-split: |
| 74 | + if: github.repository == 'sveltejs/kit' |
| 75 | + runs-on: ubuntu-latest |
| 76 | + timeout-minutes: 15 |
| 77 | + environment: '@sveltejs/adapter-netlify platform tests' |
| 78 | + env: |
| 79 | + TEST_APP_DIR: packages/adapter-netlify/test/apps/split |
| 80 | + steps: |
| 81 | + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 |
| 82 | + with: |
| 83 | + ref: ${{ inputs.sha || github.sha }} |
| 84 | + |
| 85 | + - uses: ./.github/actions/netlify-deploy |
| 86 | + id: deploy |
| 87 | + with: |
| 88 | + test-app-dir: ${{ env.TEST_APP_DIR }} |
| 89 | + netlify-project-id: ${{ secrets.NETLIFY_PROJECT_ID_SPLIT }} |
| 90 | + netlify-token: ${{ secrets.NETLIFY_TOKEN }} |
| 91 | + |
| 92 | + - uses: ./.github/actions/platform-test |
| 93 | + with: |
| 94 | + test-app-dir: ${{ env.TEST_APP_DIR }} |
| 95 | + deployment-url: ${{ steps.deploy.outputs.deployment-url }} |
0 commit comments