|
9 | 9 | type: string |
10 | 10 | jobs: |
11 | 11 | cli-v3: |
12 | | - name: "🧪 CLI v3 tests" |
| 12 | + name: "🧪 CLI v3 tests (${{ matrix.os }} - ${{ matrix.package-manager }})" |
13 | 13 | if: inputs.package == 'cli-v3' || inputs.package == '' |
14 | | - runs-on: buildjet-8vcpu-ubuntu-2204 |
| 14 | + runs-on: ${{ matrix.os }} |
15 | 15 | strategy: |
16 | 16 | fail-fast: false |
17 | 17 | matrix: |
| 18 | + os: [buildjet-8vcpu-ubuntu-2204, windows-latest] |
18 | 19 | package-manager: ["npm", "pnpm", "yarn"] |
19 | 20 | steps: |
20 | 21 | - name: ⬇️ Checkout repo |
|
46 | 47 | run: corepack enable |
47 | 48 |
|
48 | 49 | - name: Run E2E Tests |
| 50 | + shell: bash |
49 | 51 | run: | |
50 | | - PM=${{ matrix.package-manager }} pnpm --filter trigger.dev run test:e2e |
51 | | - webapp: |
52 | | - name: "🧪 Webapp tests" |
53 | | - if: inputs.package == 'webapp' || inputs.package == '' |
54 | | - runs-on: buildjet-16vcpu-ubuntu-2204 |
55 | | - steps: |
56 | | - - name: 🐳 Login to Docker Hub |
57 | | - uses: docker/login-action@v2 |
58 | | - with: |
59 | | - username: ${{ secrets.DOCKERHUB_USERNAME || vars.DOCKERHUB_USERNAME }} |
60 | | - password: ${{ secrets.DOCKERHUB_TOKEN || vars.DOCKERHUB_TOKEN }} |
61 | | - |
62 | | - - name: ⬇️ Checkout repo |
63 | | - uses: actions/checkout@v3 |
64 | | - with: |
65 | | - fetch-depth: 0 |
66 | | - submodules: recursive |
| 52 | + LOG=debug PM=${{ matrix.package-manager }} pnpm --filter trigger.dev run test:e2e |
67 | 53 |
|
68 | | - - name: ⎔ Setup pnpm |
69 | | - uses: pnpm/action-setup@v4 |
70 | | - with: |
71 | | - version: 8.15.5 |
72 | 54 |
|
73 | | - - name: ⎔ Setup node |
74 | | - uses: buildjet/setup-node@v3 |
75 | | - with: |
76 | | - node-version: 20.11.1 |
77 | | - cache: "pnpm" |
78 | | - |
79 | | - - name: 📥 Download deps |
80 | | - run: pnpm install --frozen-lockfile |
81 | | - |
82 | | - - name: Install Playwright Browsers |
83 | | - run: npx playwright install --with-deps |
84 | | - |
85 | | - - name: Run Playwright tests |
86 | | - run: | |
87 | | - # Setup environment variables |
88 | | - cp ./.env.example ./.env |
89 | | - cp ./references/nextjs-test/.env.example ./references/nextjs-test/.env.local |
90 | | -
|
91 | | - # Build packages |
92 | | - pnpm run build --filter @references/nextjs-test^... |
93 | | - cd apps/webapp && pnpm run build:server |
94 | | - cd ../.. |
95 | | - pnpm --filter @trigger.dev/database generate |
96 | | - pnpm --filter @trigger.dev/otlp-importer generate |
97 | | -
|
98 | | - # Move trigger-cli bin to correct place |
99 | | - pnpm install --frozen-lockfile |
100 | | -
|
101 | | - # Execute tests |
102 | | - pnpm run docker |
103 | | - pnpm run db:migrate |
104 | | - pnpm run db:seed |
105 | | - pnpm run test:e2e |
106 | | -
|
107 | | - # Cleanup |
108 | | - pnpm run docker:stop |
109 | | -
|
110 | | - - name: Upload Playwright report |
111 | | - uses: actions/upload-artifact@v3 |
112 | | - if: always() |
113 | | - with: |
114 | | - name: playwright-report |
115 | | - path: playwright-report/ |
116 | | - retention-days: 30 |
0 commit comments