Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run phpunit as a part of CI pipeline #1

Merged
merged 8 commits into from
Mar 15, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: phpunit
on:
push:
branches: [ master ]
pull_request:

jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
php-versions:
- '7.2'
# - '7.4'
#- '8.0'

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

# https://hub.docker.com/_/redis/
- name: Start the Redis container
env:
REDIS_PASSWORD: qwerty
run: |
docker run -d -p 6379:6379 redis:4-alpine redis-server --requirepass $REDIS_PASSWORD --port 6379

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}

- name: Compose setup
run: |
composer validate
composer check-platform-reqs
composer dump-autoload
composer install --no-interaction

- name: Test the code
run: ./vendor/bin/phpunit --verbose