-
Notifications
You must be signed in to change notification settings - Fork 4
55 lines (52 loc) · 1.59 KB
/
ci.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
name: Continious Integration
on: push
jobs:
phpstan:
name: PHPStan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
tools: composer
- name: Install dependencies
run: composer update -n --prefer-dist
- name: PHPStan
run: vendor/bin/phpstan analyse
phpunit:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['8.0', '8.1']
prefer-lowest: ['', '--prefer-lowest']
steps:
- uses: actions/checkout@master
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
coverage: pcov
tools: composer
- name: Install dependencies
if: matrix.php-versions != '8.1'
run: composer update -n --prefer-dist ${{ matrix.prefer-lowest }}
- name: Install dependencies
if: matrix.php-versions == '8.1'
run: composer install -n --prefer-dist --ignore-platform-req=php
- name: Run PHPUnit unit tests
run: vendor/bin/phpunit --coverage-clover=build/logs/clover.xml
- uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
if: matrix.php-versions == '8.0'
run:
name: Run current version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Install dependencies
run: composer install -n --prefer-dist
- name: Add a very basic htaccess file
run: echo "RewriteRule .* /foo" >> .htaccess
- name: Run current version of htaccess cli
run: bin/htaccess https://example.com