|
8 | 8 | jobs: |
9 | 9 | build-and-selftest: |
10 | 10 | if: github.head_ref != 'gitlab-main' |
11 | | - runs-on: windows-latest |
| 11 | + runs-on: ubuntu-latest |
12 | 12 |
|
13 | 13 | env: |
14 | 14 | PLAYWRIGHT_BASE_URL: https://hyva-demo.elgentos.io/ |
@@ -41,31 +41,48 @@ jobs: |
41 | 41 | with: |
42 | 42 | node-version: 18 |
43 | 43 |
|
44 | | - - name: Install dependencies |
45 | | - run: npm install |
46 | | - |
47 | | - - name: Install Playwright browsers |
48 | | - run: npx playwright install --with-deps |
49 | | - |
50 | 44 | - name: Copy config files |
51 | 45 | run: | |
52 | 46 | cp playwright.config.example.ts playwright.config.ts |
53 | 47 | cp bypass-captcha.config.example.ts bypass-captcha.config.ts |
54 | | - cp tests.config.example.ts tests.config.ts |
55 | 48 | cp tsconfig.example.json tsconfig.json |
56 | 49 |
|
57 | | - - name: Run Playwright setup test |
58 | | - run: npx playwright test --reporter=line --workers=4 tests/setup.spec.ts |
| 50 | + - name: Create testing suite environment |
| 51 | + run: | |
| 52 | + set -euo pipefail |
| 53 | + echo 'Setting up the testing environment' |
| 54 | + mkdir -p base-tests |
| 55 | + npm install |
| 56 | + npx playwright install-deps |
| 57 | + ls -l base-tests |
| 58 | + npx playwright test --grep "@setup" --reporter=line --workers=4 --max-failures=1 |
| 59 | + shell: bash |
59 | 60 | env: |
60 | | - CI: true |
| 61 | + CI: true |
| 62 | + - uses: actions/upload-artifact@v4 |
| 63 | + if: ${{ !cancelled() }} |
| 64 | + with: |
| 65 | + name: playwright-report |
| 66 | + path: playwright-report |
| 67 | + retention-days: 30 |
61 | 68 |
|
62 | 69 | - name: Run Playwright tests |
63 | | - run: npx playwright test --workers=4 --grep-invert "@setup" --max-failures=1 |
| 70 | + run: | |
| 71 | + set -euo pipefail |
| 72 | + echo "Running tests from testing suite" |
| 73 | + npx playwright install --with-deps |
| 74 | + npx playwright test --workers=4 --grep-invert "@setup" --max-failures=1 |
64 | 75 | env: |
65 | | - CI: true |
| 76 | + CI: true |
| 77 | + - uses: actions/upload-artifact@v4 |
| 78 | + if: ${{ !cancelled() }} |
| 79 | + with: |
| 80 | + name: playwright-report |
| 81 | + path: playwright-report |
| 82 | + retention-days: 30 |
66 | 83 | - uses: actions/upload-artifact@v4 |
67 | 84 | if: ${{ !cancelled() }} |
68 | 85 | with: |
69 | | - name: playwright-report |
70 | | - path: playwright-report/ |
71 | | - retention-days: 30 |
| 86 | + name: test-results |
| 87 | + path: test-results |
| 88 | + retention-days: 30 |
0 commit comments