-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Matthias Richter
committed
Mar 4, 2024
1 parent
868532e
commit 88107aa
Showing
1 changed file
with
72 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
--- | ||
name: CI | ||
on: | ||
push: | ||
jobs: | ||
code-quality: | ||
name: "Code quality checks" | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: "Checkout" | ||
uses: actions/checkout@v4 | ||
- name: "Install PHP" | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: "${{ matrix.php-version }}" | ||
coverage: none | ||
tools: composer:v2.6 | ||
- name: "Show Composer version" | ||
run: composer --version | ||
- name: "Show the Composer configuration" | ||
run: composer config --global --list | ||
- name: "Cache dependencies installed with composer" | ||
uses: actions/cache@v4 | ||
with: | ||
key: "php${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}" | ||
path: ~/.cache/composer | ||
restore-keys: "php${{ matrix.php-version }}-composer-\n" | ||
- name: "Install Composer dependencies" | ||
run: "composer update --no-progress" | ||
- name: "Run command" | ||
run: "composer ci:${{ matrix.command }}" | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
command: | ||
- php:stan | ||
php-version: | ||
- '8.2' | ||
- '8.3' | ||
|
||
unit-tests: | ||
name: Unit Tests | ||
runs-on: ubuntu-22.04 | ||
needs: [ code-quality ] | ||
strategy: | ||
matrix: | ||
php-version: | ||
- '8.2' | ||
- '8.3' | ||
steps: | ||
- name: "Checkout" | ||
uses: actions/checkout@v4 | ||
- name: "Install PHP" | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: "${{ matrix.php-version }}" | ||
coverage: none | ||
tools: composer:v2.6 | ||
- name: "Show Composer version" | ||
run: composer --version | ||
- name: "Show the Composer configuration" | ||
run: composer config --global --list | ||
- name: "Cache dependencies installed with composer" | ||
uses: actions/cache@v4 | ||
with: | ||
key: "php${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}" | ||
path: ~/.cache/composer | ||
restore-keys: "php${{ matrix.php-version }}-composer-\n" | ||
- name: "Install Composer dependencies" | ||
run: "composer update --no-progress" | ||
- name: "Run the tests" | ||
run: "composer ci:tests:unit" |