Skip to content

Commit

Permalink
Merge pull request #8 from 8ctopus/github-workflow
Browse files Browse the repository at this point in the history
Adds Github workflow for automated testing
  • Loading branch information
frqnck authored Sep 6, 2022
2 parents d2803a4 + 5cae685 commit da9c226
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: "Continuous Integration"

on:
- pull_request
- push

env:
COMPOSER_ROOT_VERSION: 1.99

jobs:
tests:
name: "Tests"

runs-on: "ubuntu-latest"

strategy:
matrix:
php-version:
- "5.3"

dependencies:
- "highest"

steps:
- name: "Checkout"
uses: "actions/checkout@v2"

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php-version }}"
ini-values: zend.assertions=1

- name: "Get composer cache directory"
id: composercache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: "Cache dependencies"
uses: actions/cache@v2
with:
path: ${{ steps.composercache.outputs.dir }}
key: ${{ runner.os }}-php-${{ matrix.php-version }}-${{ matrix.dependencies }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-php-${{ matrix.php-version }}-${{ matrix.dependencies }}-composer-

- name: "Install highest dependencies"
run: "composer update --no-interaction --no-progress"

- name: "Run tests"
timeout-minutes: 3
run: "vendor/bin/phpunit"
Empty file added build/.gitignore
Empty file.

0 comments on commit da9c226

Please sign in to comment.