Skip to content

Commit

Permalink
ci: #2 github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
shaunthegeek committed Oct 22, 2021
1 parent 34defcc commit e9eae17
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
php: [7.4, 8.0]
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}

- name: Checkout
uses: actions/checkout@v2

- name: Prepare
run: composer install

- name: Lint
run: ./vendor/bin/phpcs --extensions=php --standard=PSR12 src/ tests/

- name: PHPMD
run: ./vendor/bin/phpmd . text phpmd.xml --exclude vendor

- name: Test
run: XDEBUG_MODE=coverage ./vendor/bin/phpunit --coverage-clover coverage.xml --coverage-filter src/ tests/

- name: codecov
uses: codecov/codecov-action@v2

0 comments on commit e9eae17

Please sign in to comment.