Skip to content

Commit 19d5ff2

Browse files
committed
GitHub workflow
1 parent 498296d commit 19d5ff2

File tree

2 files changed

+70
-4
lines changed

2 files changed

+70
-4
lines changed

.github/dependabot.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,13 @@ version: 2
22
updates:
33
- package-ecosystem: github-actions
44
directory: '/'
5-
allow:
6-
- dependency-type: all
75
schedule:
86
interval: weekly
97
pull-request-branch-name:
108
separator: '-'
119
- package-ecosystem: composer
1210
directory: '/'
1311
versioning-strategy: widen
14-
allow:
15-
- dependency-type: all
1612
schedule:
1713
interval: weekly
1814
pull-request-branch-name:

.github/workflows/test.yaml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: test
2+
on:
3+
pull_request: ~
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
name: test
12+
strategy:
13+
matrix:
14+
install-args: ['', '--prefer-lowest']
15+
php-version: ['7.2', '7.3', '7.4', '8.0']
16+
steps:
17+
# Cancel previous runs of the same branch
18+
- name: cancel
19+
uses: styfle/[email protected]
20+
with:
21+
access_token: ${{ github.token }}
22+
23+
- name: checkout
24+
uses: actions/checkout@v2
25+
26+
- name: php
27+
uses: shivammathur/[email protected]
28+
with:
29+
php-version: ${{ matrix.php-version }}
30+
31+
- name: composer-cache-dir
32+
id: composercache
33+
run: |
34+
echo "::set-output name=dir::$(composer config cache-files-dir)"
35+
36+
- name: composer-cache
37+
uses: actions/[email protected]
38+
with:
39+
path: ${{ needs.prepare.outputs.composercachedir }}
40+
key: composer-${{ hashFiles('**/composer.json') }}-${{ matrix.install-args }}
41+
restore-keys: |
42+
composer-${{ hashFiles('**/composer.json') }}-${{ matrix.install-args }}
43+
composer-${{ hashFiles('**/composer.json') }}-
44+
composer-
45+
46+
- name: composer
47+
run: |
48+
composer check-platform-reqs --no-interaction
49+
composer update ${{ matrix.install-args }} --no-interaction --no-progress --prefer-dist
50+
51+
- name: phpunit
52+
run: |
53+
vendor/bin/phpunit
54+
55+
- name: phpstan-cache
56+
uses: actions/[email protected]
57+
with:
58+
key: phpstan-${{ github.ref }}-${{ matrix.php-version }}-${{ matrix.install-args }}-${{ github.sha }}
59+
path: .phpstan-cache
60+
restore-keys: |
61+
phpstan-${{ github.ref }}-${{ matrix.php-version }}-${{ matrix.install-args }}-
62+
phpstan-${{ github.ref }}-${{ matrix.php-version }}-
63+
phpstan-${{ github.ref }}-
64+
phpstan-
65+
66+
- name: phpstan
67+
run: |
68+
mkdir -p .phpstan-cache
69+
APP_ENV=dev bin/console cache:clear
70+
vendor/bin/phpstan analyse --no-progress --no-interaction --memory-limit=1G

0 commit comments

Comments
 (0)