Skip to content
Merged
Show file tree
Hide file tree
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
52 changes: 44 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

strategy:
matrix:
python-version: ["3.13"]
python-version: ["3.11", "3.12", "3.13"]

steps:
- name: Checkout repository
Expand All @@ -22,15 +22,51 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Upgrade pip and install build backend
- name: Install uv
run: |
python -m pip install --upgrade pip
python -m pip install build
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.local/bin" >> $GITHUB_PATH

- name: Install project with dependencies
- name: Install dependencies
run: |
pip install .
uv pip install --system -e . --group dev

- name: Run unittest
- name: Run pytest with coverage
run: |
python -m unittest discover -v -s tests
pytest --cov=src/tiny8 --cov-report=term-missing --cov-report=xml

- name: Upload coverage to Codecov
if: matrix.python-version == '3.13'
uses: codecov/codecov-action@v4
with:
files: ./coverage.xml
fail_ci_if_error: false

lint:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"

- name: Install uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.local/bin" >> $GITHUB_PATH

- name: Install dependencies
run: |
uv pip install --system -e . --group dev

- name: Run ruff check
run: |
ruff check src/ tests/

- name: Run ruff format check
run: |
ruff format --check src/ tests/
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ build/
dist/
wheels/
*.egg-info
.pytest_cache/

# Virtual environments
.venv
Expand Down
12 changes: 4 additions & 8 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,9 @@
},
"editor.defaultFormatter": "charliermarsh.ruff"
},
"python.testing.unittestArgs": [
"-v",
"-s",
"./tests",
"-p",
"test_*.py"
"python.testing.pytestArgs": [
"tests"
],
"python.testing.pytestEnabled": false,
"python.testing.unittestEnabled": true
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true,
}
Loading