Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docker] remove unused tests target #1207

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
14 changes: 0 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ ARG PHP_VERSION=8.2
# base
# ├── dev-tools
# │ ├── build
# │ │ └── tests
# │ └── devcontainer
# └── run (copies built artifacts out of build)

Expand Down Expand Up @@ -43,19 +42,6 @@ WORKDIR /app
RUN composer install --no-dev --no-progress
COPY . /app/

# Tests in their own image.
# Re-run composer install to get dev dependencies
FROM build AS tests
RUN composer install --no-progress
COPY . /app/
ARG RUN_TESTS=true
RUN [ $RUN_TESTS = false ] || (\
echo '=== Installing ===' && mkdir -p data/config && INSTALL_DSN="sqlite:data/shimmie.sqlite" php index.php && \
echo '=== Smoke Test ===' && php index.php get-page /post/list && \
echo '=== Unit Tests ===' && ./vendor/bin/phpunit --configuration tests/phpunit.xml && \
echo '=== Coverage ===' && ./vendor/bin/phpunit --configuration tests/phpunit.xml --coverage-text && \
echo '=== Cleaning ===' && rm -rf data)

# Devcontainer target
# Contains all of the build and debug tools, but no code, since
# that's mounted from the host
Expand Down