diff --git a/.github/workflows/build_release.yml b/.github/workflows/build_release.yml index bc29ed2..e24df49 100644 --- a/.github/workflows/build_release.yml +++ b/.github/workflows/build_release.yml @@ -9,7 +9,7 @@ jobs: name: Build package runs-on: ubuntu-latest steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 with: # Needed for `setuptools-scm` fetch-depth: 0 @@ -20,7 +20,7 @@ jobs: - name: Build wheel run: pipx run build --wheel - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v7 with: path: dist @@ -42,11 +42,11 @@ jobs: # Ref: https://docs.github.com/en/webhooks/webhook-events-and-payloads?actionType=released#release if: github.event_name == 'release' && github.event.action == 'released' steps: - - uses: actions/download-artifact@v4 + - uses: actions/download-artifact@v7 with: path: dist # put artifacts where next action expects them to be merge-multiple: true - - uses: pypa/gh-action-pypi-publish@release/v1.13 + - uses: pypa/gh-action-pypi-publish@release/v1.14 with: # For testing, use TestPyPI # repository-url: https://test.pypi.org/legacy/ diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index efc0d9c..157f24d 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -13,26 +13,29 @@ jobs: matrix: python-version: ["3.10", "3.11", "3.12", "3.13"] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} + cache: "pip" - name: Install run: pip install .[test] - name: Test run: tox continue-on-error: true + # - name: Get Test Coverage + # uses: orgoro/coverage@v3.2 + # with: + # coverageFile: coverage.xml + # token: ${{ secrets.GITHUB_TOKEN }} - name: Get Test Coverage - uses: orgoro/coverage@v3.2 + uses: insightsengineering/coverage-action@v2 + # Coverage should be the same for each python version, just pick one + if: matrix.python-version == '3.12' with: - coverageFile: coverage.xml - token: ${{ secrets.GITHUB_TOKEN }} - # - name: Run tests - # run: | - # pytest --junitxml=pytest.xml --cov-report=term-missing:skip-covered --cov=losoto tests/ | tee pytest-coverage.txt - # - name: Report test coverage - # uses: MishaKav/pytest-coverage-comment@main - # with: - # pytest-coverage-path: ./pytest-coverage.txt - # junitxml-path: ./pytest.xml + path: coverage.xml + publish: true + diff: true + diff-branch: master + togglable-report: true diff --git a/pyproject.toml b/pyproject.toml index 8cfce53..efe9a31 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -72,6 +72,5 @@ deps = [ "pytest-cov", ] commands = [ - # ["python", "{toxinidir}/tools/losoto_test.py"], ["python", "-m", "pytest", "--cov-report", "term", "--cov-report", "xml", "--cov-report", "html", "--cov=losoto", "tests/{posargs}"] ]