Skip to content

Commit 02c7db4

Browse files
committed
Migrate non shared jobs to Github Actions
1 parent 091ba7d commit 02c7db4

File tree

3 files changed

+141
-55
lines changed

3 files changed

+141
-55
lines changed
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
2+
name: "Continuous Integration"
3+
4+
on:
5+
pull_request:
6+
branches:
7+
- "*.x"
8+
push:
9+
branches:
10+
- "*.x"
11+
12+
env:
13+
fail-fast: true
14+
COMPOSER_ROOT_VERSION: "1.4"
15+
16+
jobs:
17+
phpunit:
18+
name: "PHPUnit with SQLite"
19+
runs-on: "ubuntu-20.04"
20+
21+
strategy:
22+
matrix:
23+
php-version:
24+
- "7.1"
25+
- "7.2"
26+
- "7.3"
27+
- "7.4"
28+
- "8.0"
29+
30+
steps:
31+
- name: "Checkout"
32+
uses: "actions/checkout@v2"
33+
with:
34+
fetch-depth: 2
35+
36+
- name: "Install PHP with XDebug"
37+
uses: "shivammathur/setup-php@v2"
38+
if: "${{ matrix.php-version == '7.1' }}"
39+
with:
40+
php-version: "${{ matrix.php-version }}"
41+
coverage: "xdebug"
42+
ini-values: "zend.assertions=1"
43+
44+
- name: "Install PHP with PCOV"
45+
uses: "shivammathur/setup-php@v2"
46+
if: "${{ matrix.php-version != '7.1' }}"
47+
with:
48+
php-version: "${{ matrix.php-version }}"
49+
coverage: "pcov"
50+
ini-values: "zend.assertions=1"
51+
52+
- name: "Cache dependencies installed with composer"
53+
uses: "actions/cache@v2"
54+
with:
55+
path: "~/.composer/cache"
56+
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
57+
restore-keys: "php-${{ matrix.php-version }}-composer-locked-"
58+
59+
- name: "Install dependencies with composer"
60+
run: "composer update --no-interaction --no-progress --no-suggest"
61+
62+
- name: "Run PHPUnit"
63+
run: "vendor/bin/phpunit --coverage-clover=coverage.xml"
64+
65+
- name: "Upload coverage file"
66+
uses: "actions/upload-artifact@v2"
67+
with:
68+
name: "phpunit-${{ matrix.php-version }}.coverage"
69+
path: "coverage.xml"
70+
71+
upload_coverage:
72+
name: "Upload coverage to Codecov"
73+
runs-on: "ubuntu-20.04"
74+
needs:
75+
- "phpunit"
76+
77+
steps:
78+
- name: "Checkout"
79+
uses: "actions/checkout@v2"
80+
with:
81+
fetch-depth: 2
82+
83+
- name: "Download coverage files"
84+
uses: "actions/download-artifact@v2"
85+
with:
86+
path: "reports"
87+
88+
- name: "Upload to Codecov"
89+
uses: "codecov/codecov-action@v1"
90+
with:
91+
directory: reports

.github/workflows/phpbench.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
2+
name: "Performance benchmark"
3+
4+
on:
5+
pull_request:
6+
branches:
7+
- "*.x"
8+
push:
9+
branches:
10+
- "*.x"
11+
12+
env:
13+
fail-fast: true
14+
COMPOSER_ROOT_VERSION: "1.4"
15+
16+
jobs:
17+
phpbench:
18+
name: "PHPBench"
19+
runs-on: "ubuntu-20.04"
20+
21+
strategy:
22+
matrix:
23+
php-version:
24+
- "7.1"
25+
26+
steps:
27+
- name: "Checkout"
28+
uses: "actions/checkout@v2"
29+
with:
30+
fetch-depth: 2
31+
32+
- name: "Install PHP"
33+
uses: "shivammathur/setup-php@v2"
34+
with:
35+
php-version: "${{ matrix.php-version }}"
36+
coverage: "pcov"
37+
ini-values: "zend.assertions=1"
38+
39+
- name: "Cache dependencies installed with composer"
40+
uses: "actions/cache@v2"
41+
with:
42+
path: "~/.composer/cache"
43+
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
44+
restore-keys: "php-${{ matrix.php-version }}-composer-locked-"
45+
46+
- name: "Install dependencies with composer"
47+
run: "composer update --no-interaction --no-progress --no-suggest"
48+
49+
- name: "Run PHPBench"
50+
run: "php -n ./vendor/bin/phpbench run --iterations=3 --warmup=1 --report=aggregate"

.travis.yml

Lines changed: 0 additions & 55 deletions
This file was deleted.

0 commit comments

Comments
 (0)