forked from stefandoorn/sitemap-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (61 loc) · 2.2 KB
/
ci.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: CI
on: [push, pull_request]
jobs:
php-tests:
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental }}
services:
mysql:
image: mysql:5.7
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: sylius_test
ports:
- 3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
strategy:
matrix:
php: [7.4, 8.0]
experimental: [ false ]
name: PHP${{ matrix.php }}
steps:
- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Checkout code
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
- name: Fixate test application to Sylius 1.6
run: composer require sylius/sylius:~1.6.0 --no-interaction --no-update
- name: Install dependencies
run: composer install --no-interaction --prefer-dist --ignore-platform-reqs
- name: Setup database
run: (cd tests/Application && bin/console doctrine:schema:create -vvv)
env:
DATABASE_URL: mysql://[email protected]:${{ job.services.mysql.ports['3306'] }}/sylius_test
- name: Composer validate
run: composer validate --strict
- name: Composer check-style
run: composer check-style
- name: Composer analyse
run: composer analyse
- name: Composer test
run: composer test
env:
DATABASE_URL: mysql://[email protected]:${{ job.services.mysql.ports['3306'] }}/sylius_test
- name: Upload coverage results to Coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
composer global require cedx/coveralls
coveralls coverage/clover.xml