Skip to content

Commit

Permalink
Coveralls (#95)
Browse files Browse the repository at this point in the history
* add relative_file option in pyproject.toml for coverage
* add steps in ci.yml
* move coverage config from pyproject.toml to .coveragerc because I
  can't figure out how to get coverage to read toml
* add coverage badge
  • Loading branch information
oliverxchen authored May 16, 2022
1 parent a58d2bf commit 62f4ec3
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 11 deletions.
3 changes: 3 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[run]
omit = tests/*
relative_files = True
30 changes: 26 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
name: CI

on: pull_request
on:
pull_request:
paths-ignore:
- "docs/**"
- "*.md"

jobs:
build:

test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"] # , "3.11.0-beta.1"]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
Expand Down Expand Up @@ -43,3 +46,22 @@ jobs:
- name: Run all tests and linting
run: |
make test
- name: Publish coverage to Coveralls
uses: AndreMiras/coveralls-python-action@v20201129
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel: true
flag-name: py${{ matrix.python-version }}
debug: true

coveralls-finish:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Coveralls finished
uses: AndreMiras/coveralls-python-action@v20201129
with:
parallel-finished: true
debug: true
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# sqlean

<p align="center">
<a href="https://www.python.org/"><img alt="Python versions: 3.7, 3.8, 3.9, 3.10" src="https://img.shields.io/badge/python-3.7%20%7C%203.8%20%7C%203.9%20%7C%203.10-blue"></a>
<a href="https://pypi.org/project/sqlean/"><img alt="PyPI" src="https://img.shields.io/pypi/v/sqlean"></a>
<a href="https://github.com/psf/black"><img alt="Code style: black" src="https://img.shields.io/badge/code%20style-black-000000.svg"></a>
<a href="https://github.com/oliverxchen/sqlean/blob/main/LICENSE"><img alt="License: MIT" src="https://img.shields.io/badge/license-MIT-A31F34"></a>
<a href='https://coveralls.io/github/oliverxchen/sqlean'><img src='https://coveralls.io/repos/github/oliverxchen/sqlean/badge.svg' alt='Coverage Status' /></a>
<a href="https://www.python.org/"><img alt="Python versions: 3.7, 3.8, 3.9, 3.10" src="https://img.shields.io/badge/python-3.7%20%7C%203.8%20%7C%203.9%20%7C%203.10-blue"></a>
<a href="https://pypi.org/project/sqlean/"><img alt="PyPI" src="https://img.shields.io/pypi/v/sqlean"></a>
<a href="https://github.com/psf/black"><img alt="Code style: black" src="https://img.shields.io/badge/code%20style-black-000000.svg"></a>
<a href="https://github.com/oliverxchen/sqlean/blob/main/LICENSE"><img alt="License: MIT" src="https://img.shields.io/badge/license-MIT-A31F34"></a>
</p>

sqlean is a Python CLI to clean your SQL queries. It aspires to be the
Expand Down
3 changes: 0 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@ markers = ["generate_snapshots"]
strict = "True"
warn_unused_ignores = "False"

[tool.coverage.run]
omit = ["tests/*", "sqlean/parsetab.py"]

[tool.pylint.master]
ignore-paths = "tests/"
min-public-methods = 1
Expand Down

0 comments on commit 62f4ec3

Please sign in to comment.