Skip to content

Bump actions/checkout from 4.1.1 to 6.0.2 #69

Bump actions/checkout from 4.1.1 to 6.0.2

Bump actions/checkout from 4.1.1 to 6.0.2 #69

Workflow file for this run

name: Run tests
on:
pull_request:
branches: [ master, main ]
push:
branches: [ master, main ]
concurrency:
# cancel previous runs in current pull request
group: test-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
format:
runs-on: ubuntu-latest
name: Auto-fix check (PHPCBF)
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #6.0.2
- name: Build PHP container
run: docker build --build-arg "PHP_VERSION=8.3" -t php --file docker/Dockerfile docker/
- name: Start PHP container
run: |
docker run -d --name php -v ${GITHUB_WORKSPACE}:/app php tail -f /dev/null
- name: Install dependencies
run: docker exec php /bin/sh -c "composer install"
- name: Apply PHPCBF (must leave tree clean)
run: docker exec php /bin/sh -c "bin/phpcbf"
- name: Fail if formatting differed
run: git diff --exit-code
- name: Stop PHP container
if: always()
run: docker stop php
psalm:
runs-on: ubuntu-latest
strategy:
matrix:
php-version: ["8.1", "8.2", "8.3", "8.4", "8.5"]
name: Psalm (PHP ${{ matrix.php-version }})
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #6.0.2
- name: Build PHP container
run: docker build --build-arg "PHP_VERSION=${{ matrix.php-version }}" -t php --file docker/Dockerfile docker/
- name: Start PHP container
run: |
docker run -d --name php -v ${GITHUB_WORKSPACE}:/app php tail -f /dev/null
- name: Install dependencies
run: docker exec php /bin/sh -c "composer install"
- name: Run Psalm
run: docker exec php /bin/sh -c "composer psalm -- --php-version=${{ matrix.php-version }}"
- name: Stop PHP container
if: always()
run: docker stop php
lint:
runs-on: ubuntu-latest
strategy:
matrix:
php-version: ["8.1", "8.2", "8.3", "8.4", "8.5"]
name: Lint (PHP ${{ matrix.php-version }})
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #6.0.2
- name: Build PHP container
run: docker build --build-arg "PHP_VERSION=${{ matrix.php-version }}" -t php --file docker/Dockerfile docker/
- name: Start PHP container
run: |
docker run -d --name php -v ${GITHUB_WORKSPACE}:/app php tail -f /dev/null
- name: Install dependencies
run: docker exec php /bin/sh -c "composer install"
- name: Lint
run: docker exec php /bin/sh -c "bin/phpcs"
- name: Stop PHP container
if: always()
run: docker stop php
test:
runs-on: ubuntu-latest
strategy:
matrix:
php-version: ["8.1", "8.2", "8.3", "8.4", "8.5"]
name: PHP v${{ matrix.php-version }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #6.0.2
- name: Build PHP container
run: docker build --build-arg "PHP_VERSION=${{ matrix.php-version }}" -t php --file docker/Dockerfile docker/
- name: Start PHP container
run: |
docker run -d --name php -v ${GITHUB_WORKSPACE}:/app php tail -f /dev/null
- name: Install dependencies
run: docker exec php /bin/sh -c "composer install"
- name: Run unit tests
run: docker exec php /bin/sh -c "bin/phpunit --testdox"
- name: Run integration tests
run: docker exec php /bin/sh -c "bin/behat -f progress"
- name: Stop PHP container
if: always()
run: docker stop php