From 128f55240e485145ffbecc51928f1819964d438a Mon Sep 17 00:00:00 2001 From: Simon <31246246+SimonMolinsky@users.noreply.github.com> Date: Sat, 20 Sep 2025 11:29:06 +0300 Subject: [PATCH 1/6] Check coverage workflows --- ...ython-install-and-test-on-linux-always.yml | 25 ++++++++++++++++++- README.md | 6 +++++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python-install-and-test-on-linux-always.yml b/.github/workflows/python-install-and-test-on-linux-always.yml index 1f373cb3..12ad1d0f 100644 --- a/.github/workflows/python-install-and-test-on-linux-always.yml +++ b/.github/workflows/python-install-and-test-on-linux-always.yml @@ -29,4 +29,27 @@ jobs: coverage run -m pytest -v -s - name: Generate Coverage Report run: | - coverage report -m \ No newline at end of file + coverage report -m + - name: Coverage Badge + uses: tj-actions/coverage-badge-py@1788babcb24544eb5bbb6e0d374df5d1e54e670f # v2 + + - name: Verify Changed files + uses: tj-actions/verify-changed-files@a1c6acee9df209257a246f2cc6ae8cb6581c1edf # v20 + id: verify-changed-files + with: + files: coverage.svg + + - name: Commit files + if: steps.verify-changed-files.outputs.files_changed == 'true' + run: | + git config --local user.email "github-actions[bot]@users.noreply.github.com" + git config --local user.name "github-actions[bot]" + git add coverage.svg + git commit -m "Updated coverage.svg" + + - name: Push changes + if: steps.verify-changed-files.outputs.files_changed == 'true' + uses: ad-m/github-push-action@master + with: + github_token: ${{ secrets.github_token }} + branch: ${{ github.ref }} \ No newline at end of file diff --git a/README.md b/README.md index 9454642c..21b7df18 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,11 @@ ![status](https://joss.theoj.org/papers/3f87f562264c4e5174d9e6ed6d8812aa/status.svg) ![License](https://img.shields.io/github/license/szymon-datalions/pyinterpolate) ![Documentation Status](https://readthedocs.org/projects/pyinterpolate/badge/?version=latest) [![CodeFactor](https://www.codefactor.io/repository/github/dataverselabs/pyinterpolate/badge)](https://www.codefactor.io/repository/github/dataverselabs/pyinterpolate) +[![CodeQL](https://github.com/DataverseLabs/pyinterpolate/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/DataverseLabs/pyinterpolate/actions/workflows/github-code-scanning/codeql) + +[![Run Unit Test via Pytest](https://github.com/DataverseLabs/pyinterpolate/actions/workflows/python-install-and-test-on-linux-always.yml/badge.svg)](https://github.com/DataverseLabs/pyinterpolate/actions/workflows/python-install-and-test-on-linux-always.yml) + + + # Pyinterpolate **version 1.0.3** From 938965e4245f45f37dbe175f27667d48bd84e489 Mon Sep 17 00:00:00 2001 From: Simon <31246246+SimonMolinsky@users.noreply.github.com> Date: Sat, 20 Sep 2025 15:35:11 +0300 Subject: [PATCH 2/6] Updated workflow test --- .../workflows/python-install-and-test-on-linux-always.yml | 6 ++++-- README.md | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-install-and-test-on-linux-always.yml b/.github/workflows/python-install-and-test-on-linux-always.yml index 12ad1d0f..5df4b575 100644 --- a/.github/workflows/python-install-and-test-on-linux-always.yml +++ b/.github/workflows/python-install-and-test-on-linux-always.yml @@ -4,8 +4,10 @@ on: [push] jobs: build: - - permissions: read-all + permissions: + id-token: read + contents: write + actions: read runs-on: ubuntu-latest strategy: diff --git a/README.md b/README.md index 21b7df18..50d54903 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -![status](https://joss.theoj.org/papers/3f87f562264c4e5174d9e6ed6d8812aa/status.svg) ![License](https://img.shields.io/github/license/szymon-datalions/pyinterpolate) ![Documentation Status](https://readthedocs.org/projects/pyinterpolate/badge/?version=latest) [![CodeFactor](https://www.codefactor.io/repository/github/dataverselabs/pyinterpolate/badge)](https://www.codefactor.io/repository/github/dataverselabs/pyinterpolate) +![status](https://joss.theoj.org/papers/3f87f562264c4e5174d9e6ed6d8812aa/status.svg) [![License](https://img.shields.io/badge/License-BSD_2--Clause-orange.svg)](https://opensource.org/licenses/BSD-2-Clause) ![Documentation Status](https://readthedocs.org/projects/pyinterpolate/badge/?version=latest) [![CodeFactor](https://www.codefactor.io/repository/github/dataverselabs/pyinterpolate/badge)](https://www.codefactor.io/repository/github/dataverselabs/pyinterpolate) [![CodeQL](https://github.com/DataverseLabs/pyinterpolate/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/DataverseLabs/pyinterpolate/actions/workflows/github-code-scanning/codeql) From abd2407d64a46ae0a605e6a007c2563b0dcbaf33 Mon Sep 17 00:00:00 2001 From: Simon <31246246+SimonMolinsky@users.noreply.github.com> Date: Sat, 20 Sep 2025 15:37:35 +0300 Subject: [PATCH 3/6] Update python-install-and-test-on-linux-always.yml --- .../python-install-and-test-on-linux-always.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-install-and-test-on-linux-always.yml b/.github/workflows/python-install-and-test-on-linux-always.yml index 5df4b575..6b102bdd 100644 --- a/.github/workflows/python-install-and-test-on-linux-always.yml +++ b/.github/workflows/python-install-and-test-on-linux-always.yml @@ -5,9 +5,19 @@ on: [push] jobs: build: permissions: - id-token: read - contents: write actions: read + attestations: read + checks: read + contents: write + deployments: read + id-token: none + issues: none + discussions: none + packages: read + pages: read + pull-requests: write + security-events: read + statuses: read runs-on: ubuntu-latest strategy: From 5067f66c241caa13dfa172a5eee09b0382008523 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 20 Sep 2025 12:41:02 +0000 Subject: [PATCH 4/6] Updated coverage.svg --- coverage.svg | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 coverage.svg diff --git a/coverage.svg b/coverage.svg new file mode 100644 index 00000000..318685c0 --- /dev/null +++ b/coverage.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + coverage + coverage + 85% + 85% + + From 9700aa89ce331a95bd5b6ae610bbd4b363e25f28 Mon Sep 17 00:00:00 2001 From: Simon <31246246+SimonMolinsky@users.noreply.github.com> Date: Sat, 20 Sep 2025 16:43:56 +0300 Subject: [PATCH 5/6] add tests cov workflow --- ...ython-install-and-test-on-linux-always.yml | 38 +---------- .github/workflows/python-tests-coverage.yml | 68 +++++++++++++++++++ 2 files changed, 69 insertions(+), 37 deletions(-) create mode 100644 .github/workflows/python-tests-coverage.yml diff --git a/.github/workflows/python-install-and-test-on-linux-always.yml b/.github/workflows/python-install-and-test-on-linux-always.yml index 6b102bdd..36e4f833 100644 --- a/.github/workflows/python-install-and-test-on-linux-always.yml +++ b/.github/workflows/python-install-and-test-on-linux-always.yml @@ -4,20 +4,7 @@ on: [push] jobs: build: - permissions: - actions: read - attestations: read - checks: read - contents: write - deployments: read - id-token: none - issues: none - discussions: none - packages: read - pages: read - pull-requests: write - security-events: read - statuses: read + permissions: read-all runs-on: ubuntu-latest strategy: @@ -42,26 +29,3 @@ jobs: - name: Generate Coverage Report run: | coverage report -m - - name: Coverage Badge - uses: tj-actions/coverage-badge-py@1788babcb24544eb5bbb6e0d374df5d1e54e670f # v2 - - - name: Verify Changed files - uses: tj-actions/verify-changed-files@a1c6acee9df209257a246f2cc6ae8cb6581c1edf # v20 - id: verify-changed-files - with: - files: coverage.svg - - - name: Commit files - if: steps.verify-changed-files.outputs.files_changed == 'true' - run: | - git config --local user.email "github-actions[bot]@users.noreply.github.com" - git config --local user.name "github-actions[bot]" - git add coverage.svg - git commit -m "Updated coverage.svg" - - - name: Push changes - if: steps.verify-changed-files.outputs.files_changed == 'true' - uses: ad-m/github-push-action@master - with: - github_token: ${{ secrets.github_token }} - branch: ${{ github.ref }} \ No newline at end of file diff --git a/.github/workflows/python-tests-coverage.yml b/.github/workflows/python-tests-coverage.yml new file mode 100644 index 00000000..6b4fae07 --- /dev/null +++ b/.github/workflows/python-tests-coverage.yml @@ -0,0 +1,68 @@ +name: Build tests coverage badge + +on: [push] + +jobs: + build: + permissions: + actions: read + attestations: read + checks: read + contents: write + deployments: read + id-token: none + issues: none + discussions: none + packages: read + pages: read + pull-requests: write + security-events: read + statuses: read + + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.12"] + + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install . + pip install --group dev + - name: Test with pytest + run: | + coverage run -m pytest -v -s + - name: Generate Coverage Report + run: | + coverage report -m + + - name: Coverage Badge + uses: tj-actions/coverage-badge-py@1788babcb24544eb5bbb6e0d374df5d1e54e670f # v2 + + - name: Verify Changed files + uses: tj-actions/verify-changed-files@a1c6acee9df209257a246f2cc6ae8cb6581c1edf # v20 + id: verify-changed-files + with: + files: coverage.svg + + - name: Commit files + if: steps.verify-changed-files.outputs.files_changed == 'true' + run: | + git config --local user.email "github-actions[bot]@users.noreply.github.com" + git config --local user.name "github-actions[bot]" + git add coverage.svg + git commit -m "Updated coverage.svg" + + - name: Push changes + if: steps.verify-changed-files.outputs.files_changed == 'true' + uses: ad-m/github-push-action@master + with: + github_token: ${{ secrets.github_token }} + branch: ${{ github.ref }} \ No newline at end of file From d4b7b999073612847bde3887aa89ace2d8ddfac7 Mon Sep 17 00:00:00 2001 From: Simon <31246246+SimonMolinsky@users.noreply.github.com> Date: Sat, 20 Sep 2025 16:49:03 +0300 Subject: [PATCH 6/6] Run coverage only on dev and main branches --- .github/workflows/python-tests-coverage.yml | 6 +++++- README.md | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-tests-coverage.yml b/.github/workflows/python-tests-coverage.yml index 6b4fae07..fa3444b6 100644 --- a/.github/workflows/python-tests-coverage.yml +++ b/.github/workflows/python-tests-coverage.yml @@ -1,6 +1,10 @@ name: Build tests coverage badge -on: [push] +on: + push: + branches: + - main + - dev jobs: build: diff --git a/README.md b/README.md index 50d54903..a96ad731 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ ![status](https://joss.theoj.org/papers/3f87f562264c4e5174d9e6ed6d8812aa/status.svg) [![License](https://img.shields.io/badge/License-BSD_2--Clause-orange.svg)](https://opensource.org/licenses/BSD-2-Clause) ![Documentation Status](https://readthedocs.org/projects/pyinterpolate/badge/?version=latest) [![CodeFactor](https://www.codefactor.io/repository/github/dataverselabs/pyinterpolate/badge)](https://www.codefactor.io/repository/github/dataverselabs/pyinterpolate) -[![CodeQL](https://github.com/DataverseLabs/pyinterpolate/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/DataverseLabs/pyinterpolate/actions/workflows/github-code-scanning/codeql) +[![Run Unit Test via Pytest](https://github.com/DataverseLabs/pyinterpolate/actions/workflows/python-install-and-test-on-linux-always.yml/badge.svg)](https://github.com/DataverseLabs/pyinterpolate/actions/workflows/python-install-and-test-on-linux-always.yml) [![CodeQL](https://github.com/DataverseLabs/pyinterpolate/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/DataverseLabs/pyinterpolate/actions/workflows/github-code-scanning/codeql) ![Tests Coverage](https://github.com/DataverseLabs/pyinterpolate/coverage.svg) + -[![Run Unit Test via Pytest](https://github.com/DataverseLabs/pyinterpolate/actions/workflows/python-install-and-test-on-linux-always.yml/badge.svg)](https://github.com/DataverseLabs/pyinterpolate/actions/workflows/python-install-and-test-on-linux-always.yml)