-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (37 loc) · 1.88 KB
/
tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Tests
on: [push, pull_request]
jobs:
build-and-test:
runs-on: ubuntu-22.04
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2
with:
persist-credentials: false
- name: Start docker 🔧
run: |
docker-compose -f docker-compose.yml -f .github/docker-compose.yml up -d
- name: Cache multiple paths
uses: actions/cache@v2
with:
path: |
**/vendor
key: ${{ runner.os }}-${{ hashFiles('*.lock') }}
- name: Install the dependencies 🔧
run: |
docker-compose exec -T application composer install --prefer-dist --no-interaction --no-progress
- name: Execute the tests 🔧
run: |
docker-compose exec -T application php -d extension=pcov.so ./vendor/bin/phpunit --configuration phpunit.xml.dist --colors=never --coverage-text --log-junit reports/junit.xml --coverage-html reports/coverage --coverage-clover build/logs/clover.xml
- name: Upload results to Coveralls 🚀
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_SECRET }}
run: |
docker-compose exec -T application composer global require php-coveralls/php-coveralls --prefer-dist --no-interaction --no-progress
docker-compose exec -T -e COVERALLS_REPO_TOKEN="$COVERALLS_REPO_TOKEN" application /home/application/.composer/vendor/bin/php-coveralls --coverage_clover=build/logs/clover.xml -v
- name: PHPInsights 🔧
run: |
docker-compose exec -T application ./vendor/bin/phpinsights
- name: PHPStan 🔧
run: |
docker-compose exec -T application ./vendor/bin/phpstan