Data Engineering at the University of Florida
This guide shows how to set up continuous integration (CI) for your course projects using GitHub Actions. CI automatically runs your tests every time you push code to your repository.
Create the GitHub Actions workflow file in your repository:
mkdir -p .github/workflows
touch .github/workflows/pytest.yml
Add the following content to .github/workflows/pytest.yml:
name: PyTest
on: push
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Install dependencies
run: uv sync
- name: Run test suite
run: uv run pytest -v .
| Step | Purpose |
|---|---|
actions/checkout@v4 |
Clones your repository code |
actions/setup-python@v5 |
Installs Python 3.12 |
astral-sh/setup-uv@v5 |
Installs the uv package manager |
uv sync |
Installs project dependencies from pyproject.toml |
uv run pytest -v . |
Runs all tests with verbose output |
A green checkmark indicates all tests passed. A red X indicates failures.
pyproject.tomltests/ directory.github/workflows/pytest.yml file is committedAdapted from the GitHub Actions documentation and uv documentation