-
Notifications
You must be signed in to change notification settings - Fork 1
73 lines (56 loc) · 2.1 KB
/
assertions.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
name: Assertions
on:
pull_request:
branches: main
workflow_dispatch:
jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
php-versions: ['8.0']
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
token: ${{ github.token }}
- name: Setup PHP ${{ matrix.php-versions }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
tools: composer:v2, phpcs
- name: Setup Node ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Use NPM 9
run: npm i -g npm@9
- name: Cache Node dependencies
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.OS }}-node-
- name: Cache Composer dependencies
uses: actions/cache@v2
with:
path: /tmp/composer-cache
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.OS }}-composer-
- name: Authorize Composer with WDS packagist server
run: echo '${{ secrets.COMPOSER_AUTH }}' > $GITHUB_WORKSPACE/auth.json
- name: Install dependencies
run: |
composer install --quiet
npm ci --legacy-peer-deps --ignore-scripts --no-fund --no-audit --quiet
- name: Lint PHP
run: npm run lint:php
- name: Lint scripts
run: npm run lint:js
- name: Lint styles
run: npm run lint:css
- name: Lint markdown
run: npm run lint:md
- name: Lint package.json
run: npm run lint:pkg-json