Repository navigation
69 lines (64 loc) · 1.8 KB
/
Copy pathci.yml
File metadata and controls
69 lines (64 loc) · 1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: CI
on:
push:
branches: [ main ]
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
js:
name: Build and lint JS/CSS
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v5
with:
node-version-file: .nvmrc
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm run build
- name: Build output is committed and up to date
run: git diff --exit-code -- assets/build
- run: pnpm run lint:js
- run: pnpm run lint:css
- run: pnpm run lint:pkg
php:
name: PHP lint and static analysis
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
coverage: none
tools: cs2pr
- uses: ramsey/composer-install@v3
- run: composer run lint:syntax
- run: vendor/bin/phpcs -q --report=checkstyle | cs2pr
- run: composer run phpstan -- --no-progress --error-format=github
e2e:
name: E2E (Playwright + wp-env)
runs-on: ubuntu-latest
needs: js
steps:
- uses: actions/checkout@v5
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v5
with:
node-version-file: .nvmrc
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm exec playwright install --with-deps chromium
- run: pnpm run build
- run: pnpm run env:start
- run: pnpm run test:e2e
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: '1'
- uses: actions/upload-artifact@v4
if: failure()
with:
name: playwright-artifacts
path: artifacts/
retention-days: 7