Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub Actions #607

Merged
merged 10 commits into from
May 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions .github/workflows/Tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: CI

on:
pull_request:
push:
branches:
- master

jobs:
CI:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
php: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4']
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
env:
runner: ubuntu-22.04

- name: Checkout
uses: actions/checkout@v2

- name: Validate composer.json
run: composer validate

- name: Cache composer files
uses: actions/cache@v2
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

- 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: php vendor/bin/php-coveralls --coverage_clover=build/logs/clover.xml -v

- name: Upload Scrutinizer coverage
if: github.repository == 'Austinb/GameQ'
run: |
wget https://scrutinizer-ci.com/ocular.phar
php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml --revision=${{ github.event.pull_request.head.sha || github.sha }}
3 changes: 2 additions & 1 deletion .scrutinizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ coding_style:
tools:
external_code_coverage:
enabled: true
runs: 6
timeout: 1800 # Timeout in seconds.
php_mess_detector:
config:
Expand Down Expand Up @@ -96,4 +97,4 @@ tools:
excluded_dirs: [vendor, tests, examples]
php_sim: false
sensiolabs_security_checker:
enabled: true
enabled: true
39 changes: 0 additions & 39 deletions .travis.yml

This file was deleted.