ci(actions): Use vendor phpunit #11
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
name: Continuous Integration | |
on: | |
push: | |
pull_request: | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
- ubuntu-20.04 | |
php-version: | |
# - 7.1 | |
- 7.2 | |
- 7.3 | |
- 8.0 | |
- 8.1 | |
- 8.2 | |
- 8.3 | |
- 8.4 | |
steps: | |
- name: Install dependencies (Ubuntu) | |
if: runner.os == 'Linux' | |
run: |- | |
sudo apt-get update | |
sudo apt-get install -y build-essential curl openssl | |
- uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-version }} | |
extensions: libsodium-1.0.2 | |
# tools: phpunit:4.x | |
- name: Cache multiple paths | |
uses: actions/cache@v4 | |
with: | |
path: |- | |
$HOME/libsodium | |
vendor | |
key: ${{ runner.os }}-php-${{ hashFiles('composer.json') }} | |
restore-keys: | | |
${{ runner.os }}-php- | |
- uses: actions/checkout@v4 | |
- name: Install PHP dependencies | |
run: |- | |
composer selfupdate | |
sed -i s#\>=5.4.0#\>=5.3.0#g composer.json | |
composer install --prefer-source --no-ansi --no-interaction | |
- name: Run tests | |
run: php vendor/bin/phpunit | |