Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: "CodeQL"

on: [pull_request]
jobs:
analyse:
name: Static Analysis
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 2

- run: git checkout HEAD^2

- name: Run PHPStan
run: |
docker run --rm -v $PWD:/app composer sh -c \
"composer install --profile --ignore-platform-reqs && composer check"
21 changes: 21 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: "Tests"

on: [pull_request]
jobs:
test:
name: Tests
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 2

- run: git checkout HEAD^2

- name: Run Tests
run: |
docker compose up -d
sleep 10
docker compose exec -T web vendor/bin/phpunit --configuration phpunit.xml
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
vendor
composer.lock
.phpunit.result.cache
.idea
7 changes: 2 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
FROM composer:2.0 AS step0


ARG TESTING=true

ENV TESTING=$TESTING

WORKDIR /usr/local/src/
Expand All @@ -13,17 +11,16 @@ RUN composer update --ignore-platform-reqs --optimize-autoloader \
--no-plugins --no-scripts --prefer-dist \
`if [ "$TESTING" != "true" ]; then echo "--no-dev"; fi`

FROM php:8.0-cli-alpine as final
FROM php:8.4-cli-alpine3.21 AS final
LABEL maintainer="[email protected]"

ENV DEBIAN_FRONTEND=noninteractive \
PHP_VERSION=8
PHP_VERSION=84

RUN \
apk add --no-cache --virtual .deps \
supervisor php$PHP_VERSION php$PHP_VERSION-fpm nginx bash


# Nginx Configuration (with self-signed ssl certificates)
COPY ./tests/docker/nginx.conf /etc/nginx/nginx.conf

Expand Down
7 changes: 6 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,19 @@
},
"require-dev": {
"phpunit/phpunit": "9.*",
"laravel/pint": "1.*"
"laravel/pint": "1.*",
"phpstan/phpstan": "2.*"
},
"scripts": {
"format": "vendor/bin/pint",
"lint": "vendor/bin/pint --test",
"check": "vendor/bin/phpstan analyse --level 8 src tests --memory-limit=4G",
"test": "docker-compose up -d && sleep 10 && docker-compose exec web vendor/bin/phpunit --configuration phpunit.xml"
},
"config": {
"platform": {
"php": "8.0"
},
"allow-plugins": {
"php-http/discovery": false,
"tbachert/spi": false
Expand Down
Loading