Skip to content

Commit 0466aa9

Browse files
Merge pull request #485 from DataverseLabs/484-include-ci-and-test-coverage
484 include ci and test coverage
2 parents 682a900 + d4b7b99 commit 0466aa9

File tree

4 files changed

+101
-3
lines changed

4 files changed

+101
-3
lines changed

.github/workflows/python-install-and-test-on-linux-always.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ on: [push]
44

55
jobs:
66
build:
7-
87
permissions: read-all
98

109
runs-on: ubuntu-latest
@@ -29,4 +28,4 @@ jobs:
2928
coverage run -m pytest -v -s
3029
- name: Generate Coverage Report
3130
run: |
32-
coverage report -m
31+
coverage report -m
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Build tests coverage badge
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- dev
8+
9+
jobs:
10+
build:
11+
permissions:
12+
actions: read
13+
attestations: read
14+
checks: read
15+
contents: write
16+
deployments: read
17+
id-token: none
18+
issues: none
19+
discussions: none
20+
packages: read
21+
pages: read
22+
pull-requests: write
23+
security-events: read
24+
statuses: read
25+
26+
runs-on: ubuntu-latest
27+
strategy:
28+
fail-fast: false
29+
matrix:
30+
python-version: ["3.12"]
31+
32+
steps:
33+
- uses: actions/checkout@v4
34+
- name: Set up Python ${{ matrix.python-version }}
35+
uses: actions/setup-python@v4
36+
with:
37+
python-version: ${{ matrix.python-version }}
38+
- name: Install dependencies
39+
run: |
40+
python -m pip install --upgrade pip
41+
pip install .
42+
pip install --group dev
43+
- name: Test with pytest
44+
run: |
45+
coverage run -m pytest -v -s
46+
- name: Generate Coverage Report
47+
run: |
48+
coverage report -m
49+
50+
- name: Coverage Badge
51+
uses: tj-actions/coverage-badge-py@1788babcb24544eb5bbb6e0d374df5d1e54e670f # v2
52+
53+
- name: Verify Changed files
54+
uses: tj-actions/verify-changed-files@a1c6acee9df209257a246f2cc6ae8cb6581c1edf # v20
55+
id: verify-changed-files
56+
with:
57+
files: coverage.svg
58+
59+
- name: Commit files
60+
if: steps.verify-changed-files.outputs.files_changed == 'true'
61+
run: |
62+
git config --local user.email "github-actions[bot]@users.noreply.github.com"
63+
git config --local user.name "github-actions[bot]"
64+
git add coverage.svg
65+
git commit -m "Updated coverage.svg"
66+
67+
- name: Push changes
68+
if: steps.verify-changed-files.outputs.files_changed == 'true'
69+
uses: ad-m/github-push-action@master
70+
with:
71+
github_token: ${{ secrets.github_token }}
72+
branch: ${{ github.ref }}

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
![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)
1+
![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)
2+
3+
[![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)
4+
5+
6+
7+
28

39
# Pyinterpolate
410

coverage.svg

Lines changed: 21 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)