Add basic tests framework

This commit is contained in:
2024-07-08 20:05:45 +01:00
parent 7bd1cec4bb
commit 421843757f
7 changed files with 162 additions and 1 deletions

18
.github/renovate.json vendored Normal file
View File

@@ -0,0 +1,18 @@
{
"lockFileMaintenance": {
"enabled": true,
"automerge": true
},
"packageRules": [
{
"matchPackageNames": [
"ruff"
],
"matchUpdateTypes": [
"minor",
"patch"
],
"automerge": true
}
]
}

37
.github/workflows/tests.yaml vendored Normal file
View File

@@ -0,0 +1,37 @@
name: Run Tests
on:
push:
branches:
- "main"
pull_request:
jobs:
pytest:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Test with pytest
run: |
make tests
lint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Lint with ruff
run: |
make lint