Skip to content
Merged
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
47 changes: 47 additions & 0 deletions .github/workflows/ci-pipeline.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Continuous Integration

# Run only on main and feature branches if Python files were changed
on:
push:
branches:
- main
- 'feature/**'
# Deactivated for testing
# paths:
# - '**.py'

env:
PYTHON_IMAGE: 'python:3.12-slim'
POETRY_VERSION: 2.1.2

jobs:
unit-tests:
name: Run Unit Tests
runs-on: ubuntu-latest
container: python:3.12-slim # TODO: How to use a variable here?
env:
POETRY_HOME: '/opt/poetry'
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Poetry
run: |
python -m venv $POETRY_HOME
$POETRY_HOME/bin/pip install --no-cache-dir poetry==$POETRY_VERSION

- name: Install Dependencies
run: |
cd $GITHUB_WORKSPACE
$POETRY_HOME/bin/poetry install --no-root --no-interaction --with=dev

- name: Run Pytest
run: |
$POETRY_HOME/bin/poetry run pytest tests/ -v

another-job:
name: I will eventually be a useful job
runs-on: ubuntu-latest
needs: unit-tests
steps:
- run: echo "The unit tests were successful!"