|
8 | 8 | MIN_COVERAGE: ${{ vars.MIN_COVERAGE }} |
9 | 9 |
|
10 | 10 | jobs: |
11 | | - ci: |
| 11 | + website: |
| 12 | + name: Website Tests |
| 13 | + runs-on: ubuntu-latest |
| 14 | + steps: |
| 15 | + - uses: actions/checkout@v4 |
| 16 | + |
| 17 | + - name: Setup Node.js |
| 18 | + uses: actions/setup-node@v4 |
| 19 | + with: |
| 20 | + node-version: '20' |
| 21 | + cache: 'npm' |
| 22 | + cache-dependency-path: website/package-lock.json |
| 23 | + |
| 24 | + - name: Install dependencies |
| 25 | + working-directory: website |
| 26 | + run: npm ci |
| 27 | + |
| 28 | + - name: Get Playwright version |
| 29 | + id: playwright-version |
| 30 | + working-directory: website |
| 31 | + run: echo "version=$(npm ls @playwright/test --json | jq -r '.dependencies["@playwright/test"].version')" >> $GITHUB_OUTPUT |
| 32 | + |
| 33 | + - name: Cache Playwright browsers |
| 34 | + uses: actions/cache@v4 |
| 35 | + id: playwright-cache |
| 36 | + with: |
| 37 | + path: ~/.cache/ms-playwright |
| 38 | + key: playwright-${{ runner.os }}-${{ steps.playwright-version.outputs.version }} |
| 39 | + |
| 40 | + - name: Install Playwright browsers |
| 41 | + if: steps.playwright-cache.outputs.cache-hit != 'true' |
| 42 | + working-directory: website |
| 43 | + run: npx playwright install --with-deps chromium |
| 44 | + |
| 45 | + - name: Install Playwright deps only (cached) |
| 46 | + if: steps.playwright-cache.outputs.cache-hit == 'true' |
| 47 | + run: npx playwright install-deps chromium |
| 48 | + |
| 49 | + - name: Build website |
| 50 | + working-directory: website |
| 51 | + run: npm run build |
| 52 | + |
| 53 | + - name: Run tests |
| 54 | + working-directory: website |
| 55 | + run: npm test |
| 56 | + |
| 57 | + packages: |
12 | 58 | name: Lint, Test & Build |
13 | 59 | runs-on: ubuntu-latest |
14 | 60 | steps: |
@@ -69,39 +115,3 @@ jobs: |
69 | 115 |
|
70 | 116 | - name: Test Tier 3 |
71 | 117 | run: ./tools/test.sh --ci --tier 3 |
72 | | - |
73 | | - - name: Setup Node.js for website tests |
74 | | - uses: actions/setup-node@v4 |
75 | | - with: |
76 | | - node-version: '20' |
77 | | - cache: 'npm' |
78 | | - cache-dependency-path: website/package-lock.json |
79 | | - |
80 | | - - name: Install website dependencies |
81 | | - working-directory: website |
82 | | - run: npm ci |
83 | | - |
84 | | - - name: Get Playwright version |
85 | | - id: playwright-version |
86 | | - working-directory: website |
87 | | - run: echo "version=$(npm ls @playwright/test --json | jq -r '.dependencies["@playwright/test"].version')" >> $GITHUB_OUTPUT |
88 | | - |
89 | | - - name: Cache Playwright browsers |
90 | | - uses: actions/cache@v4 |
91 | | - id: playwright-cache |
92 | | - with: |
93 | | - path: ~/.cache/ms-playwright |
94 | | - key: playwright-${{ runner.os }}-${{ steps.playwright-version.outputs.version }} |
95 | | - |
96 | | - - name: Install Playwright browsers |
97 | | - if: steps.playwright-cache.outputs.cache-hit != 'true' |
98 | | - working-directory: website |
99 | | - run: npx playwright install --with-deps chromium |
100 | | - |
101 | | - - name: Install Playwright deps only (cached) |
102 | | - if: steps.playwright-cache.outputs.cache-hit == 'true' |
103 | | - run: npx playwright install-deps chromium |
104 | | - |
105 | | - - name: Run website tests |
106 | | - working-directory: website |
107 | | - run: npm test |
|
0 commit comments