diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b2590e9..0a16563 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,28 +47,12 @@ 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 run: pipx install hatch - name: Run tests - run: hatch run 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 }} + run: hatch run +py=${{ matrix.python-version }} test:cov 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