-
Notifications
You must be signed in to change notification settings - Fork 18
73 lines (55 loc) · 1.49 KB
/
build-test.yml
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
70
71
72
73
# .github/workflows/release.yml
name: Build Test
on:
push:
branches:
- main
pull_request:
branches:
- dev
- main
env:
NODE_VERSION: 20
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: check theme version against tag
run: |
THEME_VERSION=$(cat sass/style.scss | grep Version | sed -r 's/version: +//I')
V="v"
echo Version in style.scss: $THEME_VERSION
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install npm packages
run: npm ci
- name: Lint SCSS
run: npm run lint:scss
- name: Build CSS
run: npm run compile:css
- name: Build CSS-RTL
run: npm run compile:rtl
- name: Lint JS
run: npm run lint:js
- name: Build JS
run: npm run build
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
tools: cs2pr
- name: run install composer
run: |
composer install
cd lib && composer install
- name: Run PHPCS checks
id: phpcs
continue-on-error: true
run: vendor/bin/phpcs --report-full --report-checkstyle=./phpcs-report.xml .
- name: Show PHPCS results in PR
if: ${{ always() && steps.phpcs.outcome == 'failure' }}
run: cs2pr ./phpcs-report.xml
- name: Make bundle
run: npm run bundle