This repository has been archived by the owner on Jul 2, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
45 lines (45 loc) · 2.12 KB
/
main.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: INWX-API-Bundle
on: ["push", "pull_request"]
jobs:
run:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['7.2', '7.3', '7.4']
symfony-versions: ['3.4.*', '4.2.*', '4.3.*', '4.4.*', '5.0.*']
name: PHP ${{ matrix.php-versions }} with Symfony ${{ matrix.symfony-versions }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v1
with:
coverage: xdebug
extensions: mbstring
ini-values: memory_limit=1G
php-version: ${{ matrix.php-versions }}
- name: Get Composer Cache Directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Validate composer.json and composer.lock
run: composer validate
- name: Install Symfony
run: composer require --dev --no-update symfony/framework-bundle:${{ matrix.symfony-versions }}
- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest
- uses: actions/cache@v1
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: iab-php${{ matrix.php-versions }}-sf${{ matrix.symfony-versions }}
restore-keys: iab-php${{ matrix.php-versions }}-sf${{ matrix.symfony-versions }}
- name: Run linter
run: ./vendor/bin/php-cs-fixer fix --diff --dry-run --no-interaction -v
- name: Run tests
run: ./vendor/bin/phpunit -c phpunit.dist.xml
env:
INWX_API_USERNAME: ${{ secrets.INWX_API_USERNAME }}
INWX_API_PASSWORD: ${{ secrets.INWX_API_PASSWORD }}
- name: Send to coveralls
run: ./vendor/bin/php-coveralls -v
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}