-
-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (30 loc) · 1.67 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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 --ansi --working-dir=. --strict
- name: Install PHP dependencies
run: docker run --rm --interactive --mount type=bind,source="$(pwd)"/src,target=/var/www/html dockerized-php:dev composer install --ansi --working-dir=. --no-interaction --no-progress
- name: Check Syntax
run: docker run --rm --interactive --mount type=bind,source="$(pwd)"/src,target=/var/www/html dockerized-php:dev composer check-syntax --ansi
- name: Check Style
run: docker run --rm --interactive --mount type=bind,source="$(pwd)"/src,target=/var/www/html dockerized-php:dev composer check-style --ansi
- name: Check PHPStan
run: docker run --rm --interactive --mount type=bind,source="$(pwd)"/src,target=/var/www/html dockerized-php:dev composer phpstan --ansi
- name: Check PHPUnit
run: docker run --rm --interactive --mount type=bind,source="$(pwd)"/src,target=/var/www/html dockerized-php:dev composer tests --ansi