Skip to content

Commit 425d060

Browse files
committed
GitHub Actions - tests without Docker
1 parent 61d286d commit 425d060

File tree

4 files changed

+82
-94
lines changed

4 files changed

+82
-94
lines changed

.github/workflows/test.Dockerfile

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

.github/workflows/test.yml

Lines changed: 0 additions & 76 deletions
This file was deleted.
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Tests with code coverage
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- master
8+
9+
jobs:
10+
tests:
11+
name: "Tests"
12+
runs-on: "ubuntu-latest"
13+
timeout-minutes: 30
14+
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
php-version:
19+
- "7.2"
20+
- "7.3"
21+
- "7.4"
22+
- "8.0"
23+
24+
steps:
25+
- name: "Checkout"
26+
uses: "actions/checkout@v2"
27+
28+
- name: "Install PHP"
29+
uses: "shivammathur/setup-php@v2"
30+
with:
31+
coverage: "pcov"
32+
php-version: "${{ matrix.php-version }}"
33+
extensions: mbstring
34+
35+
- name: "Install dependencies"
36+
run: "composer install --no-interaction --no-progress --no-suggest"
37+
38+
- name: "Tests"
39+
run: |
40+
php -d 'zend.assertions=1' -d 'pcov.enabled=1' -d 'pcov.directory=src' vendor/bin/phpunit --coverage-clover=.clover.xml
41+
42+
- name: "Upload Codecov Report"
43+
uses: "codecov/codecov-action@v1"
44+
with:
45+
token: ${{ secrets.CODECOV_TOKEN }}
46+
file: .clover.xml

.github/workflows/tests.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Tests
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- master
8+
9+
jobs:
10+
tests:
11+
name: "Tests"
12+
runs-on: "ubuntu-latest"
13+
timeout-minutes: 30
14+
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
php-version:
19+
- "7.1"
20+
21+
steps:
22+
- name: "Checkout"
23+
uses: "actions/checkout@v2"
24+
25+
- name: "Install PHP"
26+
uses: "shivammathur/setup-php@v2"
27+
with:
28+
coverage: "none"
29+
php-version: "${{ matrix.php-version }}"
30+
extensions: mbstring
31+
32+
- name: "Install dependencies"
33+
run: "composer install --no-interaction --no-progress --no-suggest"
34+
35+
- name: "Tests"
36+
run: "vendor/bin/phpunit"

0 commit comments

Comments
 (0)