Skip to content

Commit 6bafdc7

Browse files
committed
Add GitHub Actions
1 parent 0bec904 commit 6bafdc7

File tree

2 files changed

+78
-0
lines changed

2 files changed

+78
-0
lines changed

.github/workflows/coverage.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: PR Checks
2+
3+
on:
4+
push:
5+
branches: [ "master", "3.x" ]
6+
7+
permissions: read-all
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
15+
- name: Setup PHP with PECL extension
16+
uses: shivammathur/setup-php@v2
17+
with:
18+
php-version: '8.2'
19+
20+
- name: Cache Composer packages
21+
id: composer-cache
22+
uses: actions/cache@v3
23+
with:
24+
path: vendor
25+
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
26+
restore-keys: |
27+
${{ runner.os }}-php-
28+
29+
- name: Install dependencies
30+
run: composer install --prefer-dist --no-progress
31+
32+
- name: Run test suite
33+
run: composer run test:coverage
34+
35+
- name: Coveralls
36+
uses: coverallsapp/github-action@v2
37+
with:
38+
file: "coverage/clover.xml"

.github/workflows/pr-checks.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: PR Checks
2+
3+
on:
4+
pull_request:
5+
branches: [ "main", "develop" ]
6+
7+
permissions: read-all
8+
9+
jobs:
10+
build:
11+
runs-on: ${{ matrix.operating-system }}
12+
strategy:
13+
matrix:
14+
operating-system: [ubuntu-latest]
15+
php-versions: ['8.0','8.2','8.3']
16+
steps:
17+
- uses: actions/checkout@v3
18+
19+
- name: Setup PHP with PECL extension
20+
uses: shivammathur/setup-php@v2
21+
with:
22+
php-version: ${{ matrix.php-versions }}
23+
24+
- name: Cache Composer packages
25+
id: composer-cache
26+
uses: actions/cache@v3
27+
with:
28+
path: vendor
29+
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
30+
restore-keys: |
31+
${{ runner.os }}-php-
32+
33+
- name: Install dependencies
34+
run: composer install --prefer-dist --no-progress
35+
36+
- name: Run test suite
37+
run: composer run test
38+
39+
- name: Run quality check
40+
run: composer run quality:check

0 commit comments

Comments
 (0)