Skip to content

Commit

Permalink
use github actions to run composer
Browse files Browse the repository at this point in the history
  • Loading branch information
schulzp committed Sep 4, 2020
1 parent 1c6d6c1 commit 3a1e01b
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/composer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: PHP Composer

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

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

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

- 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
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer install --prefer-dist --no-progress --no-suggest
- name: Run test suite
run: composer run-script test
3 changes: 3 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,8 @@
"phpunit/phpunit": "^9",
"orchestra/testbench": "^4",
"mockery/mockery": "^1.1"
},
"scripts": {
"test": "phpunit"
}
}

0 comments on commit 3a1e01b

Please sign in to comment.