Skip to content

[ci] Use docker image to run PHP at version #132

[ci] Use docker image to run PHP at version

[ci] Use docker image to run PHP at version #132

Workflow file for this run

name: PHP Tests
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
PHP_VERSION: 'v8.3.2'
jobs:
composer_install:
runs-on: ubuntu-latest
container: ghcr.io/medleybox/php-cli:${{ env.PHP_VERSION }}

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

View workflow run for this annotation

GitHub Actions / PHP Tests

Invalid workflow file

The workflow is not valid. .github/workflows/php.yml (Line: 15, Col: 16): Unrecognized named-value: 'env'. Located at position 1 within expression: env.PHP_VERSION .github/workflows/php.yml (Line: 36, Col: 16): Unrecognized named-value: 'env'. Located at position 1 within expression: env.PHP_VERSION
steps:
- uses: actions/checkout@v4
- name: Validate composer.json and composer.lock
run: composer validate
- 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
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer install --prefer-dist --no-progress
test:
runs-on: ubuntu-latest
container: ghcr.io/medleybox/php-cli:${{ env.PHP_VERSION }}
needs: [composer_install]
steps:
- uses: actions/checkout@v4
- 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: Run bin/run-tests
run: bin/run-tests