Skip to content

Commit

Permalink
Merge pull request #74 from art-cg/feature/github-actions
Browse files Browse the repository at this point in the history
test: add github actions
  • Loading branch information
danielmorell authored May 4, 2022
2 parents 1f70d61 + cfd007a commit efb4d19
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/code_checks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# .github/workflows/code_checks.yaml
name: Code_Checks

on: ["push", "pull_request"]

jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ['8.0', '8.1']
stability: [ prefer-lowest, prefer-stable ]

name: PHP ${{ matrix.php }} - ${{ matrix.stability }} tests
steps:
# basically git clone
- uses: actions/checkout@v2

- name: Cache dependencies
uses: actions/cache@v1
with:
path: ~/.composer/cache/files
key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}

# use PHP of specific version
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: pcov, dom, curl, libxml, mbstring
coverage: pcov

- name: Install dependencies
run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction

- name: Execute tests
run: vendor/bin/phpunit --verbose

0 comments on commit efb4d19

Please sign in to comment.