Update github actions #25
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
# https://docs.github.com/en/actions | |
name: "Integrate" | |
on: | |
pull_request: null | |
push: | |
branches: | |
- "main" | |
jobs: | |
tests: | |
name: "Tests" | |
runs-on: "ubuntu-latest" | |
strategy: | |
matrix: | |
php-version: | |
- "8.2" | |
- "8.3" | |
continue-on-error: true | |
steps: | |
- name: "Checkout" | |
uses: "actions/checkout@v2" | |
- name: "Set up PHP" | |
uses: "shivammathur/setup-php@v2" | |
with: | |
coverage: "pcov" | |
extensions: "dom, libxml" | |
php-version: "${{ matrix.php-version }}" | |
- name: "Set up problem matchers for phpunit/phpunit" | |
run: "echo \"::add-matcher::${{ runner.tool_cache }}/phpunit.json\"" | |
- name: "Determine composer cache directory" | |
run: "echo \"COMPOSER_CACHE_DIR=$(composer config cache-dir)\" >> $GITHUB_ENV" | |
- name: "Cache dependencies installed with composer" | |
uses: "actions/[email protected]" | |
with: | |
path: "${{ env.COMPOSER_CACHE_DIR }}" | |
key: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }}" | |
restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-" | |
- name: "Install dependencies with composer" | |
run: "composer install --no-interaction --prefer-source" | |
- name: "Cache tools installed with phive" | |
uses: "actions/cache@v2" | |
with: | |
path: "${{ env.HOME }}/.phive" | |
key: "phive-${{ hashFiles('phive.xml') }}" | |
restore-keys: "phive-" | |
- name: "Install tools" | |
run: "ant tools" | |
- name: "Generate autoloader with phpab" | |
run: "ant autoload" | |
- name: "Run tests with phpunit" | |
run: "ant test" |