Skip to content

ci(Docker): performing tests on custom Docker image #74

ci(Docker): performing tests on custom Docker image

ci(Docker): performing tests on custom Docker image #74

Workflow file for this run

name: Continuous Integration
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
testsuite:
name: Testsuite
runs-on: ubuntu-latest
env:
ENV: DEVELOPMENT
steps:
- uses: actions/checkout@v4
- name: Build the Docker image
run: docker build --file Dockerfile --target build-development --tag dockerized-php:dev .
- name: Validate composer.json and composer.lock
run: docker run --rm --interactive --mount type=bind,source="$(pwd)"/src,target=/var/www/html dockerized-php:dev composer validate --working-dir=. --strict
- name: Install PHP dependencies
run: docker run --interactive --mount type=bind,source="$(pwd)"/src,target=/var/www/html dockerized-php:dev composer install --working-dir=. --no-interaction --no-progress --ansi
- name: Check Syntax
run: docker run --interactive --mount type=bind,source="$(pwd)"/src,target=/var/www/html dockerized-php:dev composer check-syntax
- name: Check Style
run: docker run --interactive --mount type=bind,source="$(pwd)"/src,target=/var/www/html dockerized-php:dev composer check-style
- name: Check PHPStan
run: docker run --interactive --mount type=bind,source="$(pwd)"/src,target=/var/www/html dockerized-php:dev composer phpstan
- name: Check PHPUnit
run: docker run --interactive --mount type=bind,source="$(pwd)"/src,target=/var/www/html dockerized-php:dev composer tests