From 87f8b6778bebcc33dd0fd30097cd82350cfe25c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul?= Date: Fri, 7 Jun 2024 08:39:44 +0200 Subject: [PATCH 1/3] ci: run with selected python version --- .github/workflows/ci.yml | 2 +- pyproject.toml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b2590e9..25d3824 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,7 +55,7 @@ jobs: - name: Install hatch run: pipx install hatch - name: Run tests - run: hatch run cov + run: hatch run +py=${{ matrix.python-version }} test:cov publish: runs-on: ubuntu-latest diff --git a/pyproject.toml b/pyproject.toml index b99e743..4528528 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,19 +57,19 @@ source = "vcs" [tool.hatch.build] exclude = [".github"] -[tool.hatch.envs.default] +[tool.hatch.envs.test] dependencies = [ "editables", "build", "pytest", "pytest-cov", ] -[tool.hatch.envs.default.scripts] +[tool.hatch.envs.test.scripts] cov = "pytest --cov-report=term-missing --cov-config=pyproject.toml --cov=src/hatch_odoo --cov=tests -v" no-cov = "cov --no-cov" [[tool.hatch.envs.test.matrix]] -python = ["37", "38", "39", "310", "311", "312"] +python = ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] [tool.coverage.run] branch = true From 31dcf551f03dfb119fa05c7c12cf9046c34aaa04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul?= Date: Fri, 7 Jun 2024 08:40:12 +0200 Subject: [PATCH 2/3] ci: remove publish job It was replaced by the release workflow --- .github/workflows/ci.yml | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 25d3824..e870b8e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -56,19 +56,3 @@ jobs: run: pipx install hatch - name: Run tests run: hatch run +py=${{ matrix.python-version }} test:cov - - publish: - runs-on: ubuntu-latest - needs: - - test - if: startsWith(github.ref, 'refs/tags') - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - - name: Build a binary wheel and a source tarball - run: pipx run build - - name: Publish distribution 📦 to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 - with: - user: __token__ - password: ${{ secrets.pypi_token }} From a672e84a8634b477160bea4a8a4c0453eb6daccd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul?= Date: Fri, 7 Jun 2024 08:42:47 +0200 Subject: [PATCH 3/3] ci: upgrade actions --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e870b8e..0a16563 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,9 +47,9 @@ jobs: - os: macos-latest python-version: "3.12" steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install hatch