From 96a7cd3cefd6aaacda9b5e45af99a97f1bf540d2 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Wed, 8 Mar 2023 21:50:15 +0000 Subject: [PATCH] ci: run PHPStan static analysis --- .github/workflows/ci.yml | 9 +++++++++ Dockerfile | 13 +++++++++++++ 2 files changed, 22 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 194da3f..35c7b9f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,3 +17,12 @@ jobs: run: | docker image build . \ --tag build-configs + + - name: Run PHPStan + run: | + docker run \ + --rm \ + --interactive \ + --entrypoint phpstan \ + build-configs \ + --no-progress diff --git a/Dockerfile b/Dockerfile index 4be9248..3233856 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,4 +2,17 @@ FROM php:8.1-cli WORKDIR /app +RUN apt-get update -yqq \ + && apt-get install -yqq git unzip + +ENV PATH="${PATH}:/app/vendor/bin" + +COPY --from=composer:2 /usr/bin/composer /usr/bin/composer + +COPY composer.* ./ + +RUN composer install + +COPY . . + ENTRYPOINT ["bash"]