Skip to content

Initial implementation #13

Initial implementation

Initial implementation #13

Workflow file for this run

name: PHPUnit
on:
push:
branches: [ main ]
pull_request:
jobs:
unit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.4
coverage: pcov
- uses: actions/cache@v4
with:
path: vendor
key: composer-${{ hashFiles('composer.lock', 'composer.json') }}
restore-keys: |
composer-
- run: composer install --no-interaction --no-progress
- run: vendor/bin/phpunit --testsuite unit --coverage-clover build/logs/clover.xml
- uses: coverallsapp/github-action@v2
with:
github-token: ${{ github.token }}
parallel: true
flag-name: phpunit-unit
integration:
runs-on: ubuntu-latest
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:9.2.1
env:
discovery.type: single-node
xpack.security.enabled: false
ports:
- 9200:9200
options: >-
--health-cmd "curl http://localhost:9200/_cluster/health"
--health-interval 10s
--health-timeout 5s
--health-retries 10
steps:
- uses: actions/checkout@v5
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.4
coverage: pcov
- uses: actions/cache@v4
with:
path: vendor
key: composer-${{ hashFiles('composer.lock', 'composer.json') }}
restore-keys: |
composer-
- run: composer install --no-interaction --no-progress
- run: ./scripts/import_dataset.php
env:
ELASTICSEARCH_HOST: localhost:9200
- run: vendor/bin/phpunit --testsuite integration --coverage-clover build/logs/clover.xml
- uses: coverallsapp/github-action@v2
with:
github-token: ${{ github.token }}
parallel: true
flag-name: phpunit-integration
finish:
needs: [unit,integration]
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
- uses: coverallsapp/github-action@v2
with:
parallel-finished: true
carryforward: "phpunit-unit,phpunit-integration"