From 4efd2ef203b4a9ad460766c9749bc7098a7879a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnter=20Grodotzki?= Date: Sat, 18 Apr 2026 14:12:06 +0200 Subject: [PATCH 1/4] Add github actions --- .github/workflows/ci.yml | 45 ++++++++++++++++++++++++++++++++++++++++ Makefile | 2 +- README.md | 2 ++ 3 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..80bb47f --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,45 @@ +name: CI + +on: + push: + branches: + - main + tags: + - "v*" + pull_request: + +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.10", "3.11", "3.12", "3.13"] + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - run: make install + + - run: make test + + - name: Upload coverage + if: matrix.python-version == '3.13' + uses: coverallsapp/github-action@v2 + with: + file: coverage.lcov + + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: "3.13" + + - run: make install + + - run: make lint diff --git a/Makefile b/Makefile index 84a8176..cbfd301 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ install: pip install -e ".[dev]" test: - python -m pytest tests/ -v --cov=loopiase --cov-report=term-missing + python -m pytest tests/ -v --cov=loopiase --cov-report=term-missing --cov-report=lcov lint: python -m pyright src/ tests/ diff --git a/README.md b/README.md index 46d938c..9219c4b 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Loopia Python Library +[![Documentation Status](https://app.readthedocs.org/projects/loopiase-python/badge/?version=latest)](https://loopiase-python.readthedocs.io/en/latest/) + Python client library for the [Loopia](https://www.loopia.se) domain registrar API. ## Installation From a6184fd5427f239d97aead163d3ca1e48ad483e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnter=20Grodotzki?= Date: Sat, 18 Apr 2026 14:27:12 +0200 Subject: [PATCH 2/4] Prep 0.0.1 --- .github/dependabot.yml | 17 ++++++++------- .github/workflows/ci.yml | 5 ++--- .github/workflows/publish.yml | 41 +++++++++++++++++++++++++++++++++++ README.md | 1 + pyproject.toml | 2 +- 5 files changed, 54 insertions(+), 12 deletions(-) create mode 100644 .github/workflows/publish.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 5990d9c..732675a 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,11 +1,12 @@ -# To get started with Dependabot version updates, you'll need to specify which -# package ecosystems to update and where the package manifests are located. -# Please see the documentation for all configuration options: -# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file - version: 2 updates: - - package-ecosystem: "" # See documentation for possible values - directory: "/" # Location of package manifests + + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" + + - package-ecosystem: "pip" + directory: "/" schedule: - interval: "weekly" + interval: "daily" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 80bb47f..bd0e4a2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,16 +4,15 @@ on: push: branches: - main - tags: - - "v*" pull_request: + workflow_call: jobs: test: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.10", "3.11", "3.12", "3.13"] + python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..8d82c82 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,41 @@ +name: Publish + +on: + push: + tags: + - "v*" + +jobs: + ci: + uses: ./.github/workflows/ci.yml + + pypi: + needs: ci + runs-on: ubuntu-latest + environment: pypi + permissions: + id-token: write + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: "3.13" + + - run: pip install build + + - run: python -m build + + - uses: pypa/gh-action-pypi-publish@release/v1 + + release: + runs-on: ubuntu-latest + needs: pypi + permissions: + contents: write + steps: + - uses: actions/checkout@v4 + + - uses: softprops/action-gh-release@v2 + with: + generate_release_notes: true diff --git a/README.md b/README.md index 9219c4b..df8bf95 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # Loopia Python Library [![Documentation Status](https://app.readthedocs.org/projects/loopiase-python/badge/?version=latest)](https://loopiase-python.readthedocs.io/en/latest/) +[![Coverage Status](https://coveralls.io/repos/github/DigitalTolk/loopiase-python/badge.svg?branch=feature/add-github-actions)](https://coveralls.io/github/DigitalTolk/loopiase-python?branch=feature/add-github-actions) Python client library for the [Loopia](https://www.loopia.se) domain registrar API. diff --git a/pyproject.toml b/pyproject.toml index 47986ad..5c07439 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "loopiase" -version = "0.1.0" +version = "0.0.1" description = "Python client library for the Loopia API" readme = "README.md" license = "GPL-3.0-only" From cc1b635fc5c8f710f8b6f3d1bd1c56146799bb66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnter=20Grodotzki?= Date: Sat, 18 Apr 2026 14:31:26 +0200 Subject: [PATCH 3/4] Potential fix for pull request finding 'CodeQL / Workflow does not contain permissions' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Signed-off-by: Günter Grodotzki --- .github/workflows/ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bd0e4a2..804a178 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,6 +7,10 @@ on: pull_request: workflow_call: +permissions: + contents: read + packages: read + jobs: test: runs-on: ubuntu-latest From 69f39c1ddb482d76429276cd93df459a854f1b54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnter=20Grodotzki?= Date: Sat, 18 Apr 2026 14:31:42 +0200 Subject: [PATCH 4/4] Potential fix for pull request finding 'CodeQL / Workflow does not contain permissions' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Signed-off-by: Günter Grodotzki --- .github/workflows/publish.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 8d82c82..b8c0412 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -7,6 +7,8 @@ on: jobs: ci: + permissions: + contents: read uses: ./.github/workflows/ci.yml pypi: