Skip to content

More correct handling of tags in the game Rust #276

More correct handling of tags in the game Rust

More correct handling of tags in the game Rust #276

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- v1
- v2
- v3
jobs:
CI:
runs-on: ubuntu-22.04
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
matrix:
php: [7.0, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1]
ocular: [^1.9]
experimental: [false]
composer-extra: ['']
include:
- php: 5.6
experimental: false
ocular: ~1.8.1
- php: 8.2
experimental: true
ocular: ^1.9
composer-extra: '--ignore-platform-req=php+'
env:
PHP_VERSION: ${{ matrix.php }}
name: PHP ${{ matrix.php }}
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: bz2,xml,curl
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 10
- name: Validate composer.json
run: composer validate
- name: Cache composer files
uses: actions/cache@v3
with:
path: ~/.composer/cache/files
key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
- name: Install dependencies using composer
run: composer install --prefer-dist --no-interaction ${{ matrix.composer-extra }}
- name: PHP CodeStyle
run: |
mkdir -p build/logs
vendor/bin/phpcs src tests --extensions=php --ignore=bootstrap --report=checkstyle --report-file=build/logs/checkstyle.xml --standard=build/config/phpcs.xml -v
vendor/bin/phpmd src,tests xml build/config/phpmd.xml
- name: Run PHPUnit
run: vendor/bin/phpunit -c phpunit.xml --verbose
- name: Upload Coveralls coverage
if: github.repository == 'Austinb/GameQ'
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
composer global require php-coveralls/php-coveralls
php ~/.composer/vendor/bin/php-coveralls --coverage_clover=build/logs/clover.xml -v
- name: Upload Scrutinizer coverage
if: github.repository == 'Austinb/GameQ'
run: |
composer global require scrutinizer/ocular ${{ matrix.ocular }}
php ~/.composer/vendor/bin/ocular code-coverage:upload --format=php-clover build/logs/clover.xml --revision=${{ github.event.pull_request.head.sha || github.sha }}