build #797
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: build | |
on: | |
push: | |
branches: ['main'] | |
pull_request: | |
branches: ['main'] | |
schedule: | |
# Run this workflow at 4 AM UTC every day. | |
- cron: '0 4 * * *' | |
workflow_dispatch: | |
env: | |
COMPOSER_FLAGS: "--ansi --no-interaction --no-progress --prefer-dist --optimize-autoloader" | |
jobs: | |
test: | |
name: Test with PHP ${{ matrix.php }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
max-parallel: 10 | |
matrix: | |
php: ['8.1', '8.2', '8.3'] | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 1 | |
- name: Install PHP and Composer 2 | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
tools: composer:v2 | |
extensions: sodium, json | |
- name: Install dependencies | |
run: | | |
composer config github-oauth.github.com ${{ secrets.GITHUB_TOKEN }} | |
composer install ${{ env.COMPOSER_FLAGS }} | |
- name: Run tests | |
run: vendor/bin/phpunit ./tests --debug | |
- name: Check dependencies for known security vulnerabilities | |
run: 'composer audit' |