Skip to content

Commit d35f6ba

Browse files
committed
CI docker container error
1 parent 71b9da5 commit d35f6ba

3 files changed

Lines changed: 6 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,5 +128,6 @@ jobs:
128128
-e _PAPERSCOUT_TESTING=1 \
129129
-e SLACK_BOT_TOKEN=xoxb-ci-placeholder \
130130
-e SLACK_SIGNING_SECRET=ci-placeholder-secret \
131+
-e COVERAGE_FILE=/tmp/.coverage \
131132
paperscout:ci \
132133
-m pytest tests/ -q --cov=paperscout --cov-fail-under=90

CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ docker run --rm --entrypoint python \
7777
-e _PAPERSCOUT_TESTING=1 \
7878
-e SLACK_BOT_TOKEN=xoxb-test \
7979
-e SLACK_SIGNING_SECRET=test-secret \
80+
-e COVERAGE_FILE=/tmp/.coverage \
8081
paperscout:test \
8182
-m pytest tests/ -q --cov=paperscout --cov-fail-under=90
8283
```

Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,11 @@ FROM runtime AS test
5050
USER root
5151
COPY --from=test-builder /build/.venv /app/.venv
5252
COPY --from=test-builder /build/tests /app/tests
53-
RUN chown -R paperscout:paperscout /app/.venv /app/tests
53+
# pytest / coverage read [tool.pytest] and [tool.coverage] from pyproject.toml
54+
COPY --from=test-builder /build/pyproject.toml /app/pyproject.toml
55+
RUN chown -R paperscout:paperscout /app
5456
USER paperscout
57+
ENV COVERAGE_FILE=/tmp/.coverage
5558
# CI runs pytest via `docker run … python -m pytest`; do not inherit paperscout ENTRYPOINT.
5659
ENTRYPOINT []
5760

0 commit comments

Comments
 (0)