Getting Github Action to work #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run Tests | ||
on: | ||
push: | ||
branches: | ||
- master | ||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Checkout the code | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
# Set up Python | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ["3.11", "3.12"] | ||
# Install UV | ||
- name: Install UV | ||
run: | | ||
curl -LsSf https://astral.sh/uv/install.sh | sh | ||
# Sync the environment with UV (will create and use .venv) | ||
- name: Sync project environment with UV | ||
run: | | ||
uv sync | ||
# Run the tests using UV | ||
- name: Run tests | ||
run: | | ||
uv run pytest |