Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[coverage:run]
relative_files = true
omit =
tests/*
49 changes: 49 additions & 0 deletions .github/workflows/.cov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name:
cov

on:
push

jobs:
cov-job:
runs-on: ubuntu-latest
name: checking coverage
permissions:
pull-requests: write
contents: write
steps:
- uses: actions/checkout@v3

- name: set up python
id: setup-python
uses: actions/setup-python@v4
with:
python-version: 3

- name: installing uv
run: pip install uv

- name: syncing uv
run: uv sync --all-extras

- name: activating uv venv
run: source .venv/bin/activate && coverage run -m pytest

# - name: launching coverage
# run: coverage run -m pytest

- name: cov_comment
id: coverage_comment
uses: py-cov-action/python-coverage-comment-action@v3
with:
GITHUB_TOKEN: ${{ github.token }}
MINIMUM_GREEN: 90

- name: Store Pull Request comment to be posted
uses: actions/upload-artifact@v4
if: steps.coverage_comment.outputs.COMMENT_FILE_WRITTEN == 'true'
with:
# If you use a different name, update COMMENT_ARTIFACT_NAME accordingly
name: python-coverage-comment-action
# If you use a different name, update COMMENT_FILENAME accordingly
path: python-coverage-comment-action.txt
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# sqlmodelgen

![Coverage badge](https://raw.githubusercontent.com/nucccc/sqlmodelgen/python-coverage-comment-action-data/badge.svg)

`sqlmodelgen` is a library to generate models for the **sqlmodel** library ([repo](https://github.com/fastapi/sqlmodel), [official docs](https://sqlmodel.tiangolo.com/)).

It accepts in input the following sources:
Expand Down
Loading