Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
297a268
feat: implement lab01 devops info service
Makcal Jan 27, 2026
cb4cf6b
feat: implement lab01 bonus task in Rust
Makcal Jan 28, 2026
827c57b
feat: implement lab02
Makcal Feb 5, 2026
33b3e67
feat: implement lab02 for Rust service
Makcal Feb 5, 2026
70c8df2
feat: implement lab03 (CI testing)
Makcal Feb 12, 2026
ccf87b1
ci: fix .github folder's location
Makcal Feb 12, 2026
cd847a2
ci: fix CI list syntax
Makcal Feb 12, 2026
3703d67
ci: fix typo
Makcal Feb 12, 2026
cf51ac1
ci: cd to app_python
Makcal Feb 12, 2026
006cf15
ci: persistent cd to app_python
Makcal Feb 12, 2026
9482fa2
ci: change docker image's name
Makcal Feb 12, 2026
c40a259
ci: use environment
Makcal Feb 12, 2026
726deaf
ci: remove duplicate cd to app_python
Makcal Feb 12, 2026
d7d5d13
ci: fix Docker workdir
Makcal Feb 12, 2026
f82ba70
ci: fix Docker workdir
Makcal Feb 12, 2026
7a2b0b8
ci: add pip cache
Makcal Feb 12, 2026
f46fb77
chore: add evidence of the pipeline working
Makcal Feb 12, 2026
f0aff85
ci: add pip cache for dev deps
Makcal Feb 12, 2026
86bd5f9
ci: fix pip cache
Makcal Feb 12, 2026
6de725f
ci: add security scan
Makcal Feb 12, 2026
6bc7b40
ci: try to fix workdir for snyk
Makcal Feb 12, 2026
5b4d63f
ci: try to fix workdir for snyk
Makcal Feb 12, 2026
5681a31
ci: try to fix workdir for snyk
Makcal Feb 12, 2026
3d73146
ci: try to fix workdir for snyk
Makcal Feb 12, 2026
2f20ceb
ci: try to fix workdir for snyk
Makcal Feb 12, 2026
b9e52a4
ci: try to fix workdir for snyk
Makcal Feb 12, 2026
b3fc9b3
ci: try to fix snyk
Makcal Feb 12, 2026
ad803c8
ci: try to fix snyk
Makcal Feb 12, 2026
ab3029b
ci: try to fix snyk
Makcal Feb 12, 2026
c1f7fba
ci: try to fix snyk
Makcal Feb 12, 2026
8e5501e
ci: try to fix snyk
Makcal Feb 12, 2026
d2c315a
ci: try to fix snyk
Makcal Feb 12, 2026
036589c
ci: try to fix snyk
Makcal Feb 12, 2026
094ae0e
ci: try to fix snyk
Makcal Feb 12, 2026
19e6a0c
ci: try to fix snyk
Makcal Feb 12, 2026
a531d17
ci: try to fix snyk
Makcal Feb 12, 2026
0b4b7bc
ci: try to fix snyk
Makcal Feb 12, 2026
df0a791
chore: finish the report for lab03
Makcal Feb 12, 2026
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
67 changes: 67 additions & 0 deletions .github/workflows/python-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Python tests

on: [push, pull_request]

defaults:
run:
working-directory: ./app_python

jobs:
test:
name: Linting, Testing, Security scan
runs-on: ubuntu-latest
environment: Snyk
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: '3.14'
cache: 'pip'
cache-dependency-path: |
app_python/requirements.txt
app_python/requirements-dev.txt
- name: Install deps
run: pip install -r requirements.txt -r requirements-dev.txt

- name: Linting
run: flake8 --radon-max-cc=10 src main.py

- name: Testing
run: pytest -v --cov=main --cov=src --cov-fail-under=85

- uses: actions/setup-node@v6
with:
node-version: 24
- name: Install Snyk CLI
run: npm install -g snyk
- name: Run Snyk dependency scan
run: snyk test --file=requirements.txt
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}

docker:
name: Build & Push Docker Image
runs-on: ubuntu-latest
needs: test
environment: Docker
if: github.ref == 'refs/heads/lab03'
steps:
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build and push
uses: docker/build-push-action@v6
with:
context: "{{defaultContext}}:app_python"
push: true
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/iu-devops-app_python:0.1.0
${{ secrets.DOCKERHUB_USERNAME }}/iu-devops-app_python:latest
224 changes: 224 additions & 0 deletions app_python/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,224 @@
# Docker specific
.gitignore
Dockerfile
README.md
docs/
tests/
.git

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[codz]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py.cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
# Pipfile.lock

# UV
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# uv.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
# poetry.lock
# poetry.toml

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
# pdm.lock
# pdm.toml
.pdm-python
.pdm-build/

# pixi
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
# pixi.lock
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
# in the .venv directory. It is recommended not to include this directory in version control.
.pixi

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# Redis
*.rdb
*.aof
*.pid

# RabbitMQ
mnesia/
rabbitmq/
rabbitmq-data/

# ActiveMQ
activemq-data/

# SageMath parsed files
*.sage.py

# Environments
.env
.envrc
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
# .idea/

# Abstra
# Abstra is an AI-powered process automation framework.
# Ignore directories containing user credentials, local state, and settings.
# Learn more at https://abstra.io/docs
.abstra/

# Visual Studio Code
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
# and can be added to the global gitignore or merged into this file. However, if you prefer,
# you could uncomment the following to ignore the entire vscode folder
# .vscode/

# Ruff stuff:
.ruff_cache/

# PyPI configuration file
.pypirc

# Marimo
marimo/_static/
marimo/_lsp/
__marimo__/

# Streamlit
.streamlit/secrets.toml
Loading