mirror of
https://github.com/ivuorinen/business-data-fetcher.git
synced 2026-01-26 11:14:10 +00:00
51 lines
1.3 KiB
YAML
51 lines
1.3 KiB
YAML
---
|
|
name: PHP Composer
|
|
|
|
on:
|
|
push:
|
|
branches: [ "main" ]
|
|
pull_request:
|
|
branches: [ "main" ]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
build:
|
|
|
|
# pre-installed php from 7.4 to 8.3
|
|
runs-on: ubuntu-24.04
|
|
|
|
strategy:
|
|
matrix:
|
|
php-versions: ['8.2', '8.3']
|
|
|
|
steps:
|
|
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6
|
|
|
|
- uses: shivammathur/setup-php@9e72090525849c5e82e596468b86eb55e9cc5401 # v2
|
|
with:
|
|
php-version: ${{ matrix.php-versions }}
|
|
|
|
- name: Validate composer.json and composer.lock
|
|
run: composer validate --strict
|
|
|
|
- name: Cache Composer packages
|
|
id: composer-cache
|
|
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5
|
|
with:
|
|
path: vendor
|
|
key: ${{ runner.os }}-php-${{ matrix.php-versions }}-${{ hashFiles('**/composer.lock') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-php-${{ matrix.php-versions }}-
|
|
${{ runner.os }}-php-
|
|
|
|
- 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
|
|
|
|
# - name: Run test suite
|
|
# run: composer run-script test
|