diff --git a/data-track/week-5/exercise_5/.github/workflows/ci.yml b/.github/workflows/ci.yml similarity index 69% rename from data-track/week-5/exercise_5/.github/workflows/ci.yml rename to .github/workflows/ci.yml index c484458..b46cc9d 100644 --- a/data-track/week-5/exercise_5/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,9 +13,16 @@ jobs: # TODO 1: Add a step to set up Python 3.11. # Use: actions/setup-python@v5 with python-version: "3.11" + - uses: actions/setup-python@v5 + with: + python-version: "3.11" # TODO 2: Add a step to install pytest. # Use: pip install pytest + - name: Install pytest + run: pip install pytest # TODO 3: Add a step to run pytest. # Use: pytest -q + - name: Run tests + run: pytest -q diff --git a/data-track/week-5/exercise_2/Dockerfile b/data-track/week-5/exercise_2/Dockerfile index 9218286..000b830 100644 --- a/data-track/week-5/exercise_2/Dockerfile +++ b/data-track/week-5/exercise_2/Dockerfile @@ -10,7 +10,8 @@ WORKDIR /app # Then reorder the instructions so dependency installs are cached # separately from source code changes. -COPY . . +COPY requirements.txt . RUN pip install -r requirements.txt +COPY src/ src/ CMD ["python", "src/pipeline.py"] diff --git a/data-track/week-5/exercise_2/src/pipeline.py b/data-track/week-5/exercise_2/src/pipeline.py index 00254d6..f2c5153 100644 --- a/data-track/week-5/exercise_2/src/pipeline.py +++ b/data-track/week-5/exercise_2/src/pipeline.py @@ -1,5 +1,8 @@ import os -print(2) +print(1) api_key = os.environ.get("API_KEY", "missing") print(f"API key present: {api_key != 'missing'}") + + +