Skip to content
Open
Show file tree
Hide file tree
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
58 changes: 58 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# --- Python Bytecode & Caches ---
__pycache__/
*.pyc
*.pyo
*.pyd
.pytest_cache/
.tox/
.nox/
.coverage
htmlcov/
.mypy_cache/
.ruff_cache/
.black

# --- Virtual Environments ---
# (Always let Docker build its own environment via requirements.txt or poetry)
.venv/
venv/
env/
ENV/
pip-log.txt
pip-delete-this-directory.txt

# --- Build & Distribution ---
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# --- Jupyter Notebooks & Lab ---
.ipynb_checkpoints
.virtual_documents/

# --- Environment Secrets & Configs ---
.env
.env.*
!.env.example
*.pod
*.pem
*.key

# --- IDEs & OS Junk ---
.vscode/
.idea/
.DS_Store
Thumbs.db
6 changes: 6 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Copy to .env for local runs: cp .env.example .env
# Do not commit .env (it is gitignored).

API_KEY=test
OUTPUT_DIR=output
GITHUB_USERNAME=<your_github_username>
32 changes: 22 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
# Task 6: Build a CI workflow that runs on pull requests and pushes to main.
#
# See the assignment chapter for the required steps and commands.
# Fill in the TODO values below.
#
# NOTE on Task 7 (ACR push): you do NOT need to add `azure/login` or `docker
# push` steps to this file. GitHub blocks repository secrets from running on
# pull_request workflows that come from a fork, so an `azure/login` step here
Expand All @@ -15,7 +10,7 @@ name: CI

on:
push:
branches: ["TODO-replace-with-main"]
branches: ["main"]
pull_request:

jobs:
Expand All @@ -29,10 +24,27 @@ jobs:
- name: Install dependencies
run: pip install -r requirements.txt
- name: Lint
run: echo "TODO implement this step"
run: ruff check src tests
- name: Format
run: echo "TODO implement this step"
run: ruff format --check src tests
- name: Test
run: echo "TODO implement this step"
run: API_KEY=test pytest -q
- name: Build image
run: echo "TODO implement this step"
run: docker build -t noneeeed-pipeline:${{ github.sha }} .
# The next three steps need the AZURE_CREDENTIALS secret, which GitHub
# withholds on pull_request runs from forks for security. The `if:` guard
# skips them on fork PRs so CI stays green; the central `Grade ACR push`
# workflow on main handles the actual push from base-repo context.
- name: Azure login
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false
uses: azure/login@v2
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: ACR login
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false
run: az acr login --name hyfregistry
- name: Push image
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false
run: |
docker tag noneeeed-pipeline:${{ github.sha }} hyfregistry.azurecr.io/noneeeed-pipeline:${{ github.sha }}
docker push hyfregistry.azurecr.io/noneeeed-pipeline:${{ github.sha }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -170,3 +170,4 @@ venv/
dist/
build/
output/
data/
Loading
Loading