Align with changes in dependencies. #7
Workflow file for this run
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
on: | |
- "pull_request" | |
- "push" | |
name: "unit" | |
permissions: | |
contents: "read" | |
jobs: | |
tests: | |
name: "Tests" | |
runs-on: "ubuntu-latest" | |
strategy: | |
fail-fast: false | |
matrix: | |
php-version: | |
- "8.1" | |
- "8.2" | |
- "8.3" | |
steps: | |
- name: "Checkout" | |
uses: "actions/checkout@v3" | |
- name: "Install Node.js" | |
uses: "actions/setup-node@v3" | |
with: | |
node-version: "16" | |
- name: "Link node" | |
run: "sudo ln -s `which node | head -n 1` /usr/bin/node" | |
- name: "Install Node.js packages" | |
run: "npm install" | |
- name: "Install PHP with extensions" | |
uses: "shivammathur/setup-php@v2" | |
with: | |
php-version: "${{ matrix.php-version }}" | |
extensions: "xdebug" | |
- name: "Cache dependencies installed with Composer" | |
uses: "actions/cache@v2" | |
with: | |
path: "~/.composer/cache" | |
key: "php${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.json') }}" | |
restore-keys: "php${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-" | |
- name: "Install dependencies with Composer" | |
run: "composer update --no-ansi --no-interaction --no-progress" | |
- name: "Run tests with PHPUnit" | |
run: "bin/phing unit" | |
- name: "Upload to Codecov" | |
uses: "codecov/codecov-action@v2" | |
with: | |
files: "test/coverage.xml" | |
verbose: true |