-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (35 loc) · 1.39 KB
/
build_and_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
name: build_and_test
on: [ push ]
jobs:
test:
name: build_and_test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
- name: Cache Composer dependencies
uses: actions/cache@v1
with:
path: vendor
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
- name: Cache Yarn dependencies
uses: actions/cache@v1
with:
path: node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/package.json') }}
restore-keys: ${{ runner.os }}-yarn-${{ hashFiles('**/package.json') }}
- name: Install Composer dependencies
run: composer update
- name: Install Yarn dependencies
run: yarn install
- name: Run tests
run: composer test
- name: PHPStan Static Analysis
run: composer analyse
- name: Build assets
run: yarn build