forked from PhpUnitsOfMeasure/php-units-of-measure
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/modernise' of https://github.com/Chris53897/php…
- Loading branch information
Showing
30 changed files
with
248 additions
and
214 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,57 @@ | ||
# .github/workflows/code_checks.yaml | ||
name: Code_Checks | ||
|
||
on: ["push", "pull_request"] | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php: ['7.4'] | ||
stability: [ prefer-stable ] | ||
experimental: [false] | ||
include: | ||
- php: '7.4' | ||
stability: prefer-lowest | ||
- php: '8.0' | ||
- php: '8.1' | ||
- php: '8.2' | ||
|
||
name: PHP ${{ matrix.php }} - ${{ matrix.stability }} tests | ||
steps: | ||
# basically git clone | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.composer/cache/files | ||
key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} | ||
|
||
# use PHP of specific version | ||
- uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
extensions: pcov | ||
coverage: pcov | ||
|
||
- name: Install dependencies | ||
run: | | ||
composer install --verbose --prefer-dist --no-interaction -o | ||
- name: Execute tests | ||
run: vendor/bin/phpunit -c ./tests/phpunit.xml.dist ./tests --verbose | ||
|
||
cs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 8.2 | ||
coverage: none # disable xdebug, pcov | ||
- run: composer install --no-progress | ||
- run: ./vendor/bin/phpcs --encoding=utf-8 --extensions=php --standard=./tests/phpcs.xml -nsp ./ | ||
|
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 |
---|---|---|
|
@@ -25,3 +25,6 @@ Desktop.ini | |
|
||
# Vagrant files | ||
/.vagrant/ | ||
|
||
.phpunit.result.cache | ||
tests/clover.xml |
This file was deleted.
Oops, something went wrong.
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
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
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
Oops, something went wrong.