-
Notifications
You must be signed in to change notification settings - Fork 5
62 lines (47 loc) · 1.27 KB
/
build.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
name: WorkshopManager
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [7.2, 7.3, 7.4, 8.0, 8.1, 8.2]
name: PHP ${{ matrix.php }}
env:
PHP_INI_VALUES: phar.readonly=0
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer:v2
ini-values: ${{ env.PHP_INI_VALUES }}
- name: Install Dependencies
run: composer update
- name: Run phpunit tests
run: |
mkdir -p build/logs
export COLUMNS=200
vendor/bin/phpunit --coverage-clover ./build/logs/clover.xml
- name: Run phpcs
run: composer cs
- name: Run phpstan
run: composer static
- name: Coverage upload
uses: codecov/codecov-action@v3
if: matrix.php == '7.4'
with:
files: ./build/logs/clover.xml
fail_ci_if_error: true
- name: Build phar
if: matrix.php == '7.2' && github.ref == 'refs/heads/master'
run: |
echo "Building phar"
./bin/deploy.sh