Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UPS-5145 Change pipeline to PHP 7.4 and add tests to pipeline #194

Merged
merged 6 commits into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
}
}
Loading