-
Notifications
You must be signed in to change notification settings - Fork 12
30 lines (29 loc) · 897 Bytes
/
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
name: Build
on: [push, pull_request]
jobs:
lint-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup PHP 8.0
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
coverage: 'xdebug'
- name: Get composer cache dir
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache composer downloads
uses: actions/cache@v1
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Install dev dependencies
run: composer install --prefer-dist
- name: Static analysis
run: composer lint
- name: Unit tests
run: composer test