Skip to content

Commit

Permalink
Merge pull request #2 from fullfatthings/actions
Browse files Browse the repository at this point in the history
Actions
  • Loading branch information
jeremyfrench authored Feb 19, 2020
2 parents 81b55ab + 95ca196 commit b099023
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 18 deletions.
18 changes: 0 additions & 18 deletions .github/workflow/php.yml

This file was deleted.

44 changes: 44 additions & 0 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: PHP Composer

on: [push]

jobs:
phpcs:
name: PHPCS
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.3'
name: Setup PHP
coverage: xdebug
tools: phpcs

- name: Test with phpcs
run: composer cs-check

unit-tests:
name: phpunit
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.3'
name: Setup PHP
coverage: xdebug
tools: phpunit


- name: Install Composer dependencies
run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader

- name: Test with phpunit
run: composer test
4 changes: 4 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,9 @@
"psr-4": {
"FullFatThings\\SameSiteException\\Tests\\": "tests/"
}
},
"scripts": {
"cs-check" : "phpcs --runtime-set ignore_warnings_on_exit true",
"test" : "vendor/bin/phpunit"
}
}

0 comments on commit b099023

Please sign in to comment.