From 88fd47b3d2be44b2c6ab87480fd0ca9894862d42 Mon Sep 17 00:00:00 2001 From: Hendrik Hogertz Date: Mon, 24 Nov 2025 13:37:19 +0100 Subject: [PATCH 1/2] ci: :construction_worker: Add test workflow --- .gitea/workflows/test.yml | 36 +++++++++++++++++++ .../dns_corenetworks_test.py | 2 +- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 .gitea/workflows/test.yml diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml new file mode 100644 index 0000000..33a554f --- /dev/null +++ b/.gitea/workflows/test.yml @@ -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 diff --git a/certbot_dns_corenetworks/dns_corenetworks_test.py b/certbot_dns_corenetworks/dns_corenetworks_test.py index d365363..5364dc8 100644 --- a/certbot_dns_corenetworks/dns_corenetworks_test.py +++ b/certbot_dns_corenetworks/dns_corenetworks_test.py @@ -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( From 880a2a04ad6b1d2df3b159e296668bd063944fbe Mon Sep 17 00:00:00 2001 From: Hendrik Hogertz Date: Mon, 24 Nov 2025 13:42:12 +0100 Subject: [PATCH 2/2] ci: Rename test workflow steps --- .gitea/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index 33a554f..d475e9a 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -17,7 +17,7 @@ jobs: - name: Checkout code uses: https://git.hogertz.eu/actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd - - name: Set up Python ${{ matrix.python-version }} + - name: Set up Python uses: https://git.hogertz.eu/actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c with: python-version: ${{ matrix.python-version }} @@ -31,6 +31,6 @@ jobs: run: | uv sync --extra dev - - name: Run tests with coverage + - name: Run tests run: | uv run pytest