Skip to content

Commit 7ca0e63

Browse files
committed
Migrate Travis to GitHub Actions
1 parent 61ecf87 commit 7ca0e63

3 files changed

Lines changed: 106 additions & 32 deletions

File tree

.github/workflows/coverage.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Coverage
2+
3+
on:
4+
push:
5+
branches: [ '**' ]
6+
pull_request:
7+
branches: [ '**' ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
php: ['8.4']
17+
setup: ['stable']
18+
19+
name: PHP
20+
21+
steps:
22+
- uses: actions/checkout@v5
23+
24+
- name: Setup PHP
25+
uses: shivammathur/setup-php@v2
26+
with:
27+
php-version: ${{ matrix.php }}
28+
tools: composer:v2
29+
coverage: pcov
30+
31+
- name: Cache Composer packages
32+
id: composer-cache
33+
uses: actions/cache@v4
34+
with:
35+
path: vendor
36+
key: ${{ runner.os }}-${{ matrix.setup }}-php-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
37+
restore-keys: |
38+
${{ runner.os }}-${{ matrix.setup }}-php-${{ matrix.php }}-
39+
40+
- name: Install dependencies
41+
if: steps.composer-cache.outputs.cache-hit != 'true'
42+
run: |
43+
composer update --prefer-dist --no-interaction ${{ format('--prefer-{0}', matrix.setup) || '' }}
44+
45+
- name: Run test suite
46+
run: vendor/bin/phpunit --coverage-text --coverage-clover=coverage.xml
47+
48+
- name: Coverage - Qltysh
49+
uses: qltysh/qlty-action/coverage@v2
50+
with:
51+
token: ${{ secrets.QLTY_COVERAGE_TOKEN }}
52+
files: clover.xml
53+
54+
- name: Coverage - Codecov
55+
uses: codecov/codecov-action@v5
56+
with:
57+
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/tests.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [ '**' ]
6+
pull_request:
7+
branches: [ '**' ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
php: ['7.2', '7.4', '8.0', '8.2', '8.4', '8.5']
17+
setup: ['lowest', 'stable']
18+
19+
name: PHP ${{ matrix.php }} - ${{ matrix.setup }}
20+
21+
steps:
22+
- uses: actions/checkout@v5
23+
24+
- name: Setup PHP
25+
uses: shivammathur/setup-php@v2
26+
with:
27+
php-version: ${{ matrix.php }}
28+
tools: composer:v2
29+
30+
- name: Cache Composer packages
31+
id: composer-cache
32+
uses: actions/cache@v4
33+
with:
34+
path: vendor
35+
key: ${{ runner.os }}-${{ matrix.setup }}-php-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
36+
restore-keys: |
37+
${{ runner.os }}-${{ matrix.setup }}-php-${{ matrix.php }}-
38+
39+
- name: Install dependencies
40+
if: steps.composer-cache.outputs.cache-hit != 'true'
41+
run: |
42+
composer update --prefer-dist --no-interaction ${{ matrix.setup != 'next' && format('--prefer-{0}', matrix.setup) || '' }}
43+
env:
44+
MULTI_TESTER_LABELS: install
45+
46+
- name: Run test suite
47+
run: vendor/bin/phpunit --no-coverage --verbose
48+
env:
49+
MULTI_TESTER_LABELS: script

.travis.yml

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

0 commit comments

Comments
 (0)