ci: 👷 Add test workflow #3

Merged
hendrik-hog merged 2 commits from ci/test into main 2025-11-24 13:44:00 +01:00
2 changed files with 37 additions and 1 deletions
Showing only changes of commit 88fd47b3d2 - Show all commits

36
.gitea/workflows/test.yml Normal file
View File

@@ -0,0 +1,36 @@
name: Tests
on:
pull_request:
push:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
steps:
- name: Checkout code
uses: https://git.hogertz.eu/actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
- name: Set up Python ${{ matrix.python-version }}
uses: https://git.hogertz.eu/actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Install dependencies
run: |
uv sync --extra dev
- name: Run tests with coverage
run: |
uv run pytest

View File

@@ -20,7 +20,7 @@ class AuthenticatorTest(test_util.TempDirTestCase):
path = os.path.join(self.tempdir, "file.ini")
dns_test_common.write(
{"corenetworks_login": LOGIN, "corenetworks_password": PASSWORD}, path
{"corenetworks_username": LOGIN, "corenetworks_password": PASSWORD}, path
)
self.config = mock.MagicMock(