system #44
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: system | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ "main" ] | |
paths: | |
- 'src/**' | |
- 'bin/**' | |
schedule: | |
- cron: '0 16 * * 0' # sunday 16:00 | |
# Actions | |
# shivammathur/setup-php@v2 https://github.com/marketplace/actions/setup-php-action | |
jobs: | |
system-tests: | |
name: System test on PHP ${{ matrix.php-versions }} | |
runs-on: "ubuntu-latest" | |
strategy: | |
matrix: | |
php-versions: ['8.2', '8.3'] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
coverage: xdebug | |
tools: composer:v2 | |
env: | |
fail-fast: true | |
- name: Get composer cache directory | |
id: composer-cache | |
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
- name: Cache dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} | |
restore-keys: ${{ runner.os }}-composer- | |
- name: Install project dependencies | |
run: composer upgrade --no-interaction --no-progress --prefer-dist --no-dev | |
- name: System test with PHP ${{ matrix.php-versions }} | |
run: php bin/sat-pys-scraper --json build/result.json --xml build/result.xml --sort key |