Skip to content

Brittleru/refactoring and adding tests #23

Brittleru/refactoring and adding tests

Brittleru/refactoring and adding tests #23

Workflow file for this run

name: Ruff Linter
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "${HOME}/.cargo/bin" >> $GITHUB_PATH
- name: Create virtual environment and install dependencies
run: |
# Create a virtual environment
uv venv
uv pip install -e .
if [ -f requirements.txt ]; then uv pip install -r requirements.txt; fi
uv pip install ruff pytest
- name: Install system dependencies for X11
run: |
sudo apt-get update
sudo apt-get install -y xvfb
- name: Run Ruff
run: |
source .venv/bin/activate
uv run ruff check .
- name: Run Tests
run: |
source .venv/bin/activate
xvfb-run -a uv run pytest tests/