Spaces:
Sleeping
Sleeping
File size: 597 Bytes
a65bafd c4d546e a65bafd c4d546e a65bafd c4d546e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# Utiliser l'image officielle Python
FROM python:3.9-slim
# Définir le dossier de travail
WORKDIR /app
# Copier uniquement les fichiers nécessaires
COPY tests/requirements.txt requirements.txt
RUN pip install --no-cache-dir --upgrade pip \
&& pip install --no-cache-dir -r requirements.txt
# Copier le code source et les tests (avec le bon chemin)
COPY main.py /app/
COPY tests/test_main.py tests/upload_s3.py /app/
# Exécuter les tests Pytest au démarrage
# CMD ["pytest", "test_etl.py", "--junitxml=results.xml"]
CMD pytest test_main.py --junitxml=results.xml && python upload_s3.py
|