Skip to content

Commit

Permalink
Add Github workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
chadicus committed May 9, 2023
1 parent 87e412b commit 05bf0eb
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: PHP Build

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['5.3', '7.0', '7.1', '7.2', '7.3', '7.4']
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
- name: Validate composer.json and composer.lock
run: composer validate
- name: Install dependencies
run: composer install --prefer-dist --no-progress
- name: Run PHPCS
run: composer run-script lint
- name: Run PHPUnit
run: composer run-script test
4 changes: 4 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,9 @@
"suggest": {
"chadicus/slim-oauth2-routes": "Offers standard OAuth2 routes for slim applications",
"chadicus/slim-oauth2-middleware": "Adds OAuth2 middleware for API requests."
},
"scripts": {
"lint": "vendor/bin/phpcs",
"test": "vendor/bin/phpunit"
}
}

0 comments on commit 05bf0eb

Please sign in to comment.