Merge pull request #183 from bizley/code-refresh #147
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 with SQLite | |
on: | |
pull_request: | |
push: | |
branches: | |
- "master" | |
jobs: | |
Tests: | |
name: PHP ${{ matrix.php }} + SQLite | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
php: ['7.2', '7.3', '7.4', '8.0', '8.1'] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
extensions: mbstring, intl, sqlite | |
coverage: none | |
env: | |
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
update: true | |
- name: Get composer cache directory | |
id: composer-cache | |
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
- name: Cache composer dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} | |
restore-keys: ${{ runner.os }}-composer- | |
- name: Install dependencies | |
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader | |
- name: PHPUnit autoloader test | |
run: vendor/bin/phpunit --configuration phpunit-no-yii-autoload.xml.dist --group autoloader | |
- name: PHPUnit tests | |
run: vendor/bin/phpunit --exclude-group mysql,pgsql,autoloader |