Skip to content

Commit 72c55cf

Browse files
committed
Use lite CI
1 parent bab7e69 commit 72c55cf

File tree

1 file changed

+19
-56
lines changed

1 file changed

+19
-56
lines changed

.github/workflows/ci.yml

+19-56
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: "Continuous Integration"
1+
name: "Tests"
22

33
on:
44
push:
@@ -8,74 +8,37 @@ on:
88
paths-ignore:
99
- 'docs/**'
1010

11-
env:
12-
COMPOSER_FLAGS: "--ansi --no-interaction --no-progress --no-suggest --prefer-dist"
13-
COVERAGE_FLAGS: "--coverage-text --coverage-clover build/logs/clover.xml"
14-
SYMFONY_PHPUNIT_REMOVE_RETURN_TYPEHINT: "1"
15-
1611
jobs:
1712
tests:
18-
name: PHP ${{ matrix.php-version }}
13+
name: PHP ${{ matrix.php-version }} - ${{ matrix.composer }}
1914
runs-on: ubuntu-latest
2015
strategy:
16+
fail-fast: false
2117
matrix:
22-
php-version:
23-
- "8.1"
24-
- "8.2"
25-
- "8.3"
26-
- "8.4"
27-
include:
28-
- php-version: 8.4
29-
coverage: coverage
18+
php-version: [8.1, 8.2, 8.3, 8.4]
19+
composer: [highest, lowest]
20+
3021
steps:
3122
- name: Checkout
32-
uses: actions/checkout@v2
33-
with:
34-
fetch-depth: 10
23+
uses: actions/checkout@v4
24+
3525
- name: Setup PHP, with composer and extensions
3626
uses: shivammathur/setup-php@v2
3727
with:
3828
php-version: ${{ matrix.php-version }}
3929
extensions: dom
4030
coverage: xdebug
41-
env:
42-
update: true
43-
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44-
- name: Setup Problem Matchers for PHPUnit
45-
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
46-
- name: Get composer cache directory
47-
id: composer-cache
48-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
49-
- name: Cache composer dependencies
50-
uses: actions/cache@v1
51-
with:
52-
path: ${{ steps.composer-cache.outputs.dir }}
53-
key: ${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}
54-
restore-keys: ${{ matrix.php-version }}-composer-
55-
- name: Install Composer
56-
uses: nick-invision/retry@v1
31+
tools: composer:v2
32+
33+
- uses: "ramsey/composer-install@v3"
5734
with:
58-
timeout_minutes: 10
59-
max_attempts: 3
60-
command: composer update ${{ env.COMPOSER_FLAGS }}
35+
dependency-versions: "${{ matrix.composer }}"
36+
6137
- name: composer validate
6238
run: composer validate --strict
63-
- name: Test with phpunit (with coverage)
64-
id: phpunit-coverage
65-
if: "matrix.coverage == 'coverage'"
66-
run: vendor/bin/phpunit --verbose ${{ env.COVERAGE_FLAGS }}
67-
- name: Test with phpunit (without coverage)
68-
if: "matrix.coverage != 'coverage'"
69-
run: vendor/bin/phpunit --verbose
70-
- name: Submit Coveralls
71-
if: steps.phpunit-coverage.outcome == 'success'
72-
uses: nick-invision/retry@v1
73-
with:
74-
timeout_minutes: 10
75-
max_attempts: 3
76-
command: |
77-
[[ -f vendor/bin/php-coveralls ]] && COVERALLS_PATH=vendor/bin/php-coveralls || COVERALLS_PATH=vendor/bin/coveralls
78-
[[ -n $COVERALLS_REPO_TOKEN ]] && php $COVERALLS_PATH -v --exclude-no-stmt || true
79-
env:
80-
COVERALLS_RUN_LOCALLY: 1
81-
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
39+
40+
- name: Run unit tests
41+
run: "./vendor/bin/phpunit --colors=always --coverage-clover build/logs/clover.xml --coverage-text"
42+
43+
- name: Publish coverage report to Codecov
44+
uses: "codecov/codecov-action@v5"

0 commit comments

Comments
 (0)