mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-21 14:20:42 +08:00
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:
@@ -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/**/*
|
||||
|
||||
@@ -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/**/*
|
||||
|
||||
@@ -9,7 +9,6 @@ on:
|
||||
|
||||
jobs:
|
||||
check-format:
|
||||
if: github.event.pull_request.merged == false
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Setup Node
|
||||
|
||||
@@ -9,7 +9,6 @@ on:
|
||||
|
||||
jobs:
|
||||
check-unit-test:
|
||||
if: github.event.pull_request.merged == false
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Setup Node
|
||||
|
||||
@@ -9,7 +9,6 @@ on:
|
||||
|
||||
jobs:
|
||||
check:
|
||||
if: github.event.pull_request.merged == false
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Setup Node
|
||||
|
||||
Reference in New Issue
Block a user