winp #139
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PHP Tests | |
on: | |
push: | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
tests: | |
name: Run PHPUnit Tests | |
runs-on: ubuntu-latest | |
services: | |
neo4j: | |
image: neo4j:latest | |
ports: | |
- 7474:7474 | |
- 7687:7687 | |
env: | |
NEO4J_AUTH: neo4j/password | |
options: >- | |
--health-cmd "curl --silent --fail localhost:7474 || exit 1" | |
--health-interval 10s | |
--health-retries 5 | |
--health-timeout 5s | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 8.2 | |
tools: composer, xdebug | |
- name: Cache Composer dependencies | |
uses: actions/cache@v3 | |
with: | |
path: vendor | |
key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }} | |
restore-keys: ${{ runner.os }}-composer- | |
- name: Install dependencies | |
run: composer install --no-progress --prefer-dist | |
- name: Load environment variables from .env | |
run: | | |
export $(grep -v '^#' .env | xargs) | |
- name: Run PHPUnit Tests | |
run: vendor/bin/phpunit --configuration phpunit.dist.xml |