Improve CI workflows

- bump visual spec timeouts
- don't warn if there are no artifacts
- revert unneeded workflow checks
- improve workflow messages

Signed-off-by: Rūdolfs Ošiņš <rudolfs@osins.org>
This commit is contained in:
Rūdolfs Ošiņš
2022-12-16 23:10:57 +01:00
parent 65b37b7ef4
commit 41168db8d5
6 changed files with 10 additions and 10 deletions
+3 -2
View File
@@ -9,7 +9,6 @@ on:
jobs:
check-build:
if: github.event.pull_request.merged == false
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
@@ -25,10 +24,12 @@ jobs:
run: npm run build
- name: Run Playwright build smoke test
run: npm run test:e2e -- --project chromium --config playwright.buildSmoke.config.ts
- uses: actions/upload-artifact@v3
- name: Upload artifacts
uses: actions/upload-artifact@v3
if: always()
with:
name: test-artifacts-${{ runner.os }}
retention-days: 30
if-no-files-found: "ignore"
path: |
tests/artifacts/**/*
+5 -4
View File
@@ -9,7 +9,6 @@ on:
jobs:
check-e2e:
if: github.event.pull_request.merged == false
continue-on-error: true
strategy:
matrix:
@@ -33,14 +32,14 @@ jobs:
path: ~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-${{ hashFiles('package-lock.json') }}
- name: Cache snapshots (generate on master, load on pull_request)
- name: Cache Playwright visual snapshots
uses: actions/cache@v3
id: playwright-snapshot-cache
with:
path: tests/visual/snapshots/**/*
key: ${{ runner.os }}-snapshots
- name: Install Playwright with deps unless cached
- name: Install Playwright browsers and OS dependencies if cache miss
if: steps.playwright-dep-cache.outputs.cache-hit != 'true'
run: npx playwright install --with-deps
@@ -59,10 +58,12 @@ jobs:
npm run test:e2e -- --project ${{ matrix.browser }};
fi
- uses: actions/upload-artifact@v3
- name: Upload artifacts
uses: actions/upload-artifact@v3
if: always()
with:
name: test-artifacts-${{ runner.os }}
retention-days: 30
if-no-files-found: "ignore"
path: |
tests/artifacts/**/*
-1
View File
@@ -9,7 +9,6 @@ on:
jobs:
check-format:
if: github.event.pull_request.merged == false
runs-on: ubuntu-latest
steps:
- name: Setup Node
-1
View File
@@ -9,7 +9,6 @@ on:
jobs:
check-unit-test:
if: github.event.pull_request.merged == false
runs-on: ubuntu-latest
steps:
- name: Setup Node
-1
View File
@@ -9,7 +9,6 @@ on:
jobs:
check:
if: github.event.pull_request.merged == false
runs-on: ubuntu-latest
steps:
- name: Setup Node
+2 -1
View File
@@ -41,8 +41,9 @@ const config: PlaywrightTestConfig = {
},
{
name: "visual",
timeout: 60_000,
expect: {
timeout: 16_000,
timeout: 30_000,
toHaveScreenshot: {
threshold: 0.1,
scale: "device",