Skip to content

- Update all non-major dependencies with digest and pinDigest #1002

- Update all non-major dependencies with digest and pinDigest

- Update all non-major dependencies with digest and pinDigest #1002

name: Test & lint PHP stuff
on:
pull_request:
branches:
- main
types:
- opened
- synchronize
- reopened
- ready_for_review
paths:
- '**.php'
- 'composer.json'
- 'composer.lock'
- 'phpunit.xml'
- '.env.ci'
- 'test-and-lint-php.yml'
jobs:
test-and-lint-php:
name: Test & lint PHP stuff
timeout-minutes: 10
if: github.event.pull_request.draft == false
runs-on: ubuntu-22.04
services:
postgres:
image: postgres:15@sha256:06dd85a64e950719a3ee8435ce1bdc32b5f8acf406185d7ff875bcced5817165
env:
POSTGRES_DB: toby-test
POSTGRES_USER: toby
POSTGRES_PASSWORD: password
ports:
- 5432:5432
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Validate composer.json and composer.lock
run: composer validate
- name: Cache dependencies
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
with:
path: vendor
key: ${{ runner.os }}-composer-dependencies-${{ hashFiles('composer.lock') }}
restore-keys: ${{ runner.os }}-composer-dependencies
- name: Setup PHP
uses: shivammathur/setup-php@9e72090525849c5e82e596468b86eb55e9cc5401 # 2.32.0
with:
php-version: 8.3
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, pdo_pgsql, intl, gd
coverage: none
- name: Install Composer dependencies
run: composer install --prefer-dist --no-interaction --no-suggest
- name: Run PHP linter
run: composer cs
- name: Execute tests
run: |
cp .env.ci .env
php artisan test --colors=always