Skip to content

Commit 0551950

Browse files
committed
add github actions
1 parent 9c47a51 commit 0551950

3 files changed

Lines changed: 84 additions & 5 deletions

File tree

.gitattributes

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
/tests export-ignore
2-
.editorconfig export-ignore
3-
.gitattributes export-ignore
4-
.gitignore export-ignore
5-
phpunit.xml export-ignore
1+
/.github/ export-ignore
2+
/tests/ export-ignore
3+
/.editorconfig export-ignore
4+
/.gitattributes export-ignore
5+
/.gitignore export-ignore
6+
/phpunit.xml export-ignore

.github/workflows/checks.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Checks
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
9+
jobs:
10+
composer-normalize:
11+
name: Composer Normalize
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v2
17+
18+
- name: Install
19+
uses: docker://composer
20+
with:
21+
args: install
22+
23+
- name: Normalize
24+
uses: docker://composer
25+
with:
26+
args: composer normalize --dry-run

.github/workflows/ci.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
9+
jobs:
10+
build-lowest-version:
11+
name: Build lowest version
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Set up PHP
16+
uses: shivammathur/setup-php@v2
17+
with:
18+
php-version: '7.2'
19+
coverage: 'none'
20+
21+
- name: Checkout code
22+
uses: actions/checkout@v2
23+
24+
- name: Install dependencies
25+
run: composer update --no-interaction --prefer-stable --prefer-lowest --no-progress --prefer-dist
26+
27+
- name: Run tests
28+
run: vendor/bin/simple-phpunit
29+
30+
build:
31+
name: Build
32+
runs-on: ubuntu-latest
33+
strategy:
34+
max-parallel: 10
35+
matrix:
36+
php: ['7.2', '7.3', '7.4', '8.0']
37+
38+
steps:
39+
- name: Set up PHP
40+
uses: shivammathur/setup-php@v2
41+
with:
42+
php-version: ${{ matrix.php }}
43+
coverage: 'none'
44+
45+
- name: Checkout code
46+
uses: actions/checkout@v2
47+
48+
- name: Install dependencies
49+
run: composer update --no-interaction --no-progress --prefer-dist
50+
51+
- name: Run tests
52+
run: vendor/bin/simple-phpunit

0 commit comments

Comments
 (0)