Skip to content

Create php.yml

Create php.yml #4

Workflow file for this run

name: PHP Composer
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Validate composer.json and composer.lock
with:
php-version: 8.2
run: composer validate --strict

Check failure on line 23 in .github/workflows/php.yml

View workflow run for this annotation

GitHub Actions / PHP Composer

Invalid workflow file

The workflow is not valid. .github/workflows/php.yml (Line: 23, Col: 7): Unexpected value 'run' .github/workflows/php.yml (Line: 20, Col: 7): Required property is missing: uses
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
php-version: 8.2
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
with:
php-version: 8.2
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
with:
php-version: 8.2
run: composer run-script check