|
13 | 13 | - name: "Checkout Repository" |
14 | 14 | uses: actions/checkout@v7.0.0 |
15 | 15 | - name: "Install Node" |
16 | | - uses: actions/setup-node@v6.4.0 |
| 16 | + uses: actions/setup-node@v7.0.0 |
17 | 17 | with: |
18 | 18 | node-version: '24' |
19 | 19 | - name: "Install Dependencies" |
@@ -148,6 +148,76 @@ jobs: |
148 | 148 | name: cypress-screenshots-visual |
149 | 149 | path: cypress/screenshots |
150 | 150 |
|
| 151 | + playwright-visual-regression-test-init: |
| 152 | + name: "Initialize Playwright Visual Regression Test" |
| 153 | + runs-on: ubuntu-latest |
| 154 | + needs: install-and-build |
| 155 | + steps: |
| 156 | + - name: "Checkout Repository" |
| 157 | + uses: actions/checkout@v7.0.0 |
| 158 | + |
| 159 | + - name: "Save current Head-Ref as PR-branch" |
| 160 | + shell: bash |
| 161 | + run: git checkout -B PR-HEAD |
| 162 | + |
| 163 | + - uses: ./.github/actions/prepare |
| 164 | + with: |
| 165 | + usebasebranch: true |
| 166 | + loadprbuild: false |
| 167 | + |
| 168 | + - name: "Checkout Playwright tests from Head-Ref" |
| 169 | + shell: bash |
| 170 | + run: | |
| 171 | + git checkout PR-HEAD -- ./playwright |
| 172 | + git checkout PR-HEAD -- ./example |
| 173 | + git checkout PR-HEAD -- ./package.json |
| 174 | + git checkout PR-HEAD -- ./playwright.config.js |
| 175 | + git checkout PR-HEAD -- ./playwright.init.config.js |
| 176 | + git checkout PR-HEAD -- ./playwright.visual.config.js |
| 177 | +
|
| 178 | + - name: "Install PR npm dependencies" |
| 179 | + run: ELECTRON_SKIP_BINARY_DOWNLOAD=1 npm install |
| 180 | + |
| 181 | + - name: "Install Playwright Chromium" |
| 182 | + run: npx playwright install --with-deps chromium |
| 183 | + |
| 184 | + - name: "Generate Playwright baseline screenshots" |
| 185 | + run: npm run test:pw:init |
| 186 | + |
| 187 | + - uses: actions/upload-artifact@v7 |
| 188 | + with: |
| 189 | + name: playwright-init-screenshots |
| 190 | + path: playwright/screenshots_init |
| 191 | + |
| 192 | + playwright-visual-regression-test: |
| 193 | + name: "Playwright Visual Regression Test" |
| 194 | + runs-on: ubuntu-latest |
| 195 | + needs: playwright-visual-regression-test-init |
| 196 | + steps: |
| 197 | + - name: "Checkout Repository" |
| 198 | + uses: actions/checkout@v7.0.0 |
| 199 | + |
| 200 | + - uses: ./.github/actions/prepare |
| 201 | + |
| 202 | + - name: "Install Playwright Chromium" |
| 203 | + run: npx playwright install --with-deps chromium |
| 204 | + |
| 205 | + - uses: actions/download-artifact@v8 |
| 206 | + with: |
| 207 | + name: playwright-init-screenshots |
| 208 | + path: playwright/screenshots_init |
| 209 | + |
| 210 | + - name: "Run Playwright visual regression tests" |
| 211 | + run: npm run test:pw:visual |
| 212 | + |
| 213 | + - uses: actions/upload-artifact@v7 |
| 214 | + if: failure() |
| 215 | + with: |
| 216 | + name: playwright-screenshots-visual |
| 217 | + path: | |
| 218 | + playwright/test-results/ |
| 219 | + playwright/playwright-report/ |
| 220 | +
|
151 | 221 | functional-test: |
152 | 222 | name: "Functional Test (Websocket)" |
153 | 223 | runs-on: ubuntu-latest |
|
0 commit comments