Skip to content

Commit

Permalink
mocktest image
Browse files Browse the repository at this point in the history
  • Loading branch information
mattiaBarbo committed Aug 12, 2024
1 parent b0287e8 commit 23ea2f1
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/Quality_Assessment_&_Awarding_v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ jobs:
with:
name: pytest-test
tool: commands
commands: pytest /app/tests
container: hpci/yprov-sqa:1.4
commands: pytest /app/tests/test_mock_auth.py
container: hpci/yprov-sqa:mocktest

- name: SQAaaS assessment with unit testing (QC.Uni) step
uses: eosc-synergy/sqaaas-assessment-action@v2
Expand Down
30 changes: 17 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
# Usa l'immagine ufficiale di Python come base
FROM python:3.9-slim

# Imposta la directory di lavoro nel container
WORKDIR /app
# Install dependencies
RUN apt-get update && apt-get install -y \
curl \
git \
docker.io

# Installa curl
RUN apt-get update && apt-get install -y curl
# Work Directory
WORKDIR /app

# Copia l'intero contenuto della directory del progetto nella directory di lavoro del container
COPY . .
# Clean and clone updated GitHub repo
RUN rm -rf /app/* && \
git clone --branch sqa https://github.com/HPCI-Lab/yProv.git .

# Assegna i permessi di esecuzione allo script 'tests.sh'
RUN chmod +x /app/tests/tests.sh
# Install requirements
COPY requirements.txt /app/requirements.txt
RUN pip install -r requirements.txt

# Installa le dipendenze del progetto, se necessario
RUN pip install --no-cache-dir -r requirements.txt
# Install additional Python dependencies
RUN pip install requests pytest responses

# Comando di default: esegue lo script 'tests.sh'
CMD ["/app/tests/tests.sh"]
# Keep the container running with tail
CMD ["tail", "-f", "/dev/null"]
20 changes: 20 additions & 0 deletions tests/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Usa l'immagine ufficiale di Python come base
FROM python:3.9-slim

# Imposta la directory di lavoro nel container
WORKDIR /app

# Installa curl
RUN apt-get update && apt-get install -y curl

# Copia l'intero contenuto della directory del progetto nella directory di lavoro del container
COPY . .

# Assegna i permessi di esecuzione allo script 'tests.sh'
RUN chmod +x /app/tests/tests.sh

# Installa le dipendenze del progetto, se necessario
RUN pip install --no-cache-dir -r requirements.txt

# Comando di default: esegue lo script 'tests.sh'
CMD ["/app/tests/tests.sh"]

0 comments on commit 23ea2f1

Please sign in to comment.