Skip to content

Commit

Permalink
add GitHub Action
Browse files Browse the repository at this point in the history
  • Loading branch information
someniatko committed Mar 21, 2022
1 parent 976d803 commit d81ae72
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: PHP Composer

on: [ push, pull_request ]

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Validate composer.json and composer.lock
run: composer validate --strict

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
run: composer install --prefer-dist --no-progress

- name: Unit tests
run: composer run test
3 changes: 3 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
"require-dev": {
"phpunit/phpunit": "^9.5"
},
"scripts": {
"test": "vendor/bin/phpunit"
},
"license": "MIT",
"authors": [
{
Expand Down

0 comments on commit d81ae72

Please sign in to comment.