Skip to content

Commit

Permalink
Update GitHub config files
Browse files Browse the repository at this point in the history
  • Loading branch information
natanfelles committed Dec 15, 2021
1 parent b1728f3 commit 7b6a828
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 17 deletions.
4 changes: 0 additions & 4 deletions .github/PULL_REQUEST_TEMPLATE.md

This file was deleted.

13 changes: 0 additions & 13 deletions .github/workflows/close-pull-request.yml

This file was deleted.

62 changes: 62 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Tests

on:
push:
pull_request:
schedule:
- cron: '0 4 * * *'

jobs:
tests:
runs-on: ubuntu-20.04

strategy:
fail-fast: true
matrix:
php: ['8.0', '8.1']

name: PHP ${{ matrix.php }}

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer
coverage: xdebug

- name: Install dependencies
run:
composer update

- name: Composer normalize
run:
composer normalize --dry-run --indent-size=4 --indent-style=space

- name: Coding Standard
run:
vendor/bin/php-cs-fixer fix --diff --dry-run --verbose

- name: PHPMD
run:
vendor/bin/phpmd src xml phpmd.xml

- name: PHPStan
run:
vendor/bin/phpstan analyse -vvv

- name: PHPUnit
run: vendor/bin/phpunit --verbose

- name: Upload coverage results to Coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
mkdir -p build/logs/
cp build/coverage/clover.xml build/logs/clover.xml
composer global require php-coveralls/php-coveralls
php-coveralls --coverage_clover=build/logs/clover.xml -v
if: matrix.php == '8.0'

0 comments on commit 7b6a828

Please sign in to comment.