|
| 1 | +name: 🔄 Smoke Tests Test |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_call: |
| 5 | + inputs: |
| 6 | + os: |
| 7 | + required: true |
| 8 | + type: string |
| 9 | + |
| 10 | +jobs: |
| 11 | + smoke-tests: |
| 12 | + runs-on: ${{ inputs.os }} |
| 13 | + |
| 14 | + env: |
| 15 | + REDWOOD_CI: 1 |
| 16 | + REDWOOD_VERBOSE_TELEMETRY: 1 |
| 17 | + |
| 18 | + steps: |
| 19 | + - name: Checkout the framework code |
| 20 | + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 |
| 21 | + |
| 22 | + - name: Set up job |
| 23 | + uses: ./.github/actions/set-up-job |
| 24 | + |
| 25 | + - name: 🌲 Set up test project |
| 26 | + id: set-up-test-project |
| 27 | + uses: ./.github/actions/set-up-test-project-esm |
| 28 | + env: |
| 29 | + REDWOOD_DISABLE_TELEMETRY: 1 |
| 30 | + YARN_ENABLE_IMMUTABLE_INSTALLS: false |
| 31 | + |
| 32 | + - name: 🎭 Install playwright dependencies |
| 33 | + run: npx playwright install --with-deps chromium |
| 34 | + |
| 35 | + - name: 🧑💻 Run dev smoke tests |
| 36 | + working-directory: ./tasks/smoke-tests/dev |
| 37 | + run: npx playwright test |
| 38 | + env: |
| 39 | + REDWOOD_TEST_PROJECT_PATH: '${{ steps.set-up-test-project.outputs.test-project-path }}' |
| 40 | + REDWOOD_DISABLE_TELEMETRY: 1 |
| 41 | + |
| 42 | + - name: 🔐 Run auth smoke tests |
| 43 | + working-directory: ./tasks/smoke-tests/auth |
| 44 | + run: npx playwright test |
| 45 | + env: |
| 46 | + REDWOOD_TEST_PROJECT_PATH: ${{ steps.set-up-test-project.outputs.test-project-path }} |
| 47 | + REDWOOD_DISABLE_TELEMETRY: 1 |
| 48 | + |
| 49 | + - name: Run `rw build --no-prerender` |
| 50 | + run: | |
| 51 | + yarn rw build --no-prerender |
| 52 | + working-directory: ${{ steps.set-up-test-project.outputs.test-project-path }} |
| 53 | + |
| 54 | + - name: Run `rw prerender` |
| 55 | + run: | |
| 56 | + yarn rw prerender --verbose |
| 57 | + working-directory: ${{ steps.set-up-test-project.outputs.test-project-path }} |
| 58 | + |
| 59 | + - name: Run `rw test web` |
| 60 | + run: | |
| 61 | + yarn rw test web --no-watch |
| 62 | + working-directory: ${{ steps.set-up-test-project.outputs.test-project-path }} |
| 63 | + |
| 64 | + - name: Run `rw test api` |
| 65 | + run: | |
| 66 | + yarn rw test api --no-watch |
| 67 | + working-directory: ${{ steps.set-up-test-project.outputs.test-project-path }} |
| 68 | + |
| 69 | + - name: Run db import tracking tests |
| 70 | + shell: bash |
| 71 | + run: | |
| 72 | + # Only run this for ESM projects where the vitest config file exists |
| 73 | + if test -f ./vitest-sort.config.ts; then |
| 74 | + npx vitest --config ./vitest-sort.config.ts run |
| 75 | + fi |
| 76 | + working-directory: ${{ steps.set-up-test-project.outputs.test-project-path }}/api |
| 77 | + |
| 78 | + - name: 🖥️ Run serve smoke tests |
| 79 | + working-directory: tasks/smoke-tests/serve |
| 80 | + run: npx playwright test |
| 81 | + env: |
| 82 | + REDWOOD_TEST_PROJECT_PATH: ${{ steps.set-up-test-project.outputs.test-project-path }} |
| 83 | + REDWOOD_DISABLE_TELEMETRY: 1 |
| 84 | + |
| 85 | + - name: 📄 Run prerender smoke tests |
| 86 | + working-directory: tasks/smoke-tests/prerender |
| 87 | + run: npx playwright test |
| 88 | + env: |
| 89 | + REDWOOD_TEST_PROJECT_PATH: ${{ steps.set-up-test-project.outputs.test-project-path }} |
| 90 | + REDWOOD_DISABLE_TELEMETRY: 1 |
| 91 | + |
| 92 | + - name: 📕 Run Storybook smoke tests |
| 93 | + working-directory: tasks/smoke-tests/storybook |
| 94 | + run: npx playwright test |
| 95 | + env: |
| 96 | + REDWOOD_TEST_PROJECT_PATH: ${{ steps.set-up-test-project.outputs.test-project-path }} |
| 97 | + REDWOOD_DISABLE_TELEMETRY: 1 |
0 commit comments