Skip to content

Commit

Permalink
Fix GitHub Actions config
Browse files Browse the repository at this point in the history
  • Loading branch information
kocsismate committed Aug 30, 2020
1 parent b9ddae4 commit 7975b5d
Showing 1 changed file with 30 additions and 25 deletions.
55 changes: 30 additions & 25 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ jobs:
uses: actions/checkout@master

- name: "Install PHP 7.4"
run: |
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.4 php7.4-mbstring php7.4-xml
uses: shivammathur/setup-php@v2
with:
php-version: "7.4"
extensions: mbstring, xml
tools: composer

- name: "Cache dependencies"
uses: actions/cache@v1
Expand Down Expand Up @@ -48,10 +49,11 @@ jobs:
uses: actions/checkout@master

- name: "Install PHP 7.4"
run: |
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.4 php7.4-mbstring php7.4-xml
uses: shivammathur/setup-php@v2
with:
php-version: "7.4"
extensions: mbstring, xml
tools: composer

- name: "Cache dependencies"
uses: actions/cache@v1
Expand All @@ -75,11 +77,11 @@ jobs:

strategy:
matrix:
php-binary:
- php7.4
- php7.3
- php7.2
- php7.1
php-version:
- "7.1"
- "7.2"
- "7.3"
- "7.4"

dependencies:
- lowest
Expand All @@ -89,11 +91,12 @@ jobs:
- name: "Checkout"
uses: actions/checkout@master

- name: "Install PHP 7.4"
run: |
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.4 php7.4-mbstring php7.4-xml
- name: "Install PHP ${{ matrix.php-version }}"
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: mbstring, xml
tools: composer

- name: "Cache dependencies"
uses: actions/cache@v1
Expand All @@ -106,14 +109,14 @@ jobs:
- name: "Install lowest dependencies with composer"
if: matrix.dependencies == 'lowest'
run: ${{ matrix.php-binary }} $(which composer) update --no-interaction --no-progress --no-suggest --no-plugins --prefer-lowest
run: php${{ matrix.php-version }} $(which composer) update --no-interaction --no-progress --no-suggest --no-plugins --prefer-lowest

- name: "Install highest dependencies with composer"
if: matrix.dependencies == 'highest'
run: ${{ matrix.php-binary }} $(which composer) update --no-interaction --no-progress --no-suggest --no-plugins
run: php${{ matrix.php-version }} $(which composer) update --no-interaction --no-progress --no-suggest --no-plugins

- name: "Run unit tests"
run: ${{ matrix.php-binary }} vendor/bin/phpunit
run: php${{ matrix.php-version }} vendor/bin/phpunit

code-coverage:
name: "Code Coverage"
Expand All @@ -125,10 +128,12 @@ jobs:
uses: actions/checkout@master

- name: "Install PHP 7.4"
run: |
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.4 php7.4-mbstring php7.4-xdebug php7.4-xml
uses: shivammathur/setup-php@v2
with:
php-version: "7.4"
extensions: mbstring, xml
coverage: xdebug
tools: composer

- name: "Cache dependencies"
uses: actions/cache@v1
Expand Down

0 comments on commit 7975b5d

Please sign in to comment.