Skip to content

Commit

Permalink
Add backport workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ouss-oud committed Aug 26, 2024
1 parent a547f06 commit ee45d63
Showing 1 changed file with 26 additions and 18 deletions.
44 changes: 26 additions & 18 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: Run tests


on:
push:
branches: [ "master" ]
Expand All @@ -9,6 +10,7 @@ on:
permissions:
contents: read


jobs:
build:

Expand All @@ -32,26 +34,32 @@ jobs:
MONGO_INITDB_ROOT_PASSWORD: secret

steps:
- uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
extensions: mbstring, intl

- uses: actions/checkout@v4

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

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v4
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
run: composer install --prefer-dist --no-progress
- name: Install dependencies
run: composer install --prefer-dist --no-progress

# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
# Docs: https://getcomposer.org/doc/articles/scripts.md
# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
# Docs: https://getcomposer.org/doc/articles/scripts.md

- name: Run test suite
run: |
composer test
- name: Run test suite
run: |
composer test

0 comments on commit ee45d63

Please sign in to comment.