Skip to content

Commit

Permalink
Merge pull request #194 from cultuurnet/UPS-5145/upgrade-to-php-7.4
Browse files Browse the repository at this point in the history
UPS-5145 Change pipeline to PHP 7.4 and add tests to pipeline
  • Loading branch information
grubolsch authored Jul 17, 2024
2 parents 565d515 + 794f2e2 commit ca7e1b8
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 42 deletions.
80 changes: 39 additions & 41 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,44 +3,42 @@ name: CI
on: push

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['7.1', '7.2', '7.3', '7.4']
name: PHP ${{ matrix.php-versions }}
steps:
- uses: actions/checkout@v2

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: intl
tools: composer:v1

- name: Check PHP Version
run: php -v

- name: Validate composer.json and composer.lock
run: composer validate

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install composer dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer install --no-progress --no-suggest

- name: Install npm dependencies
run: npm install

- name: Run Phing
run: composer run-script phing
phing:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['7.4']
name: Phing ${{ matrix.php-versions }}
steps:
- name: πŸ“€ Checkout project
uses: actions/checkout@v4

- name: 🐘 Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
ini-values: xdebug.mode=coverage
extensions: bcmath, tidy
tools: composer

- name: ✌️ Check PHP Version
run: php -v

- name: πŸ›‚ Validate composer.json and composer.lock
run: composer validate

- name: πŸ“© Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}-v1
restore-keys: |
${{ runner.os }}-php-
- name: πŸ“¦ Install dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer install --no-progress --no-suggest

- name: βœ… Run Phing
run: composer run-script phing
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
"minimum-stability": "dev",
"prefer-stable": true,
"scripts": {
"phing": "./vendor/bin/phing test"
"phing": "./vendor/bin/phing test",
"test": "./vendor/bin/phpunit"
}
}

0 comments on commit ca7e1b8

Please sign in to comment.