-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use local lcov for PRs and codecov for push to master (#413)
- Loading branch information
1 parent
98bf22a
commit 91ab2bf
Showing
3 changed files
with
46 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: pr-coverage-lint | ||
|
||
on: | ||
pull_request: | ||
branches: ['*'] | ||
|
||
jobs: | ||
tests: | ||
name: Coverage and Lint | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
submodules: recursive | ||
|
||
- uses: actions/[email protected] | ||
with: | ||
python-version: 3.11 | ||
|
||
- name: Install from source | ||
run: | | ||
pip install --upgrade pip setuptools wheel | ||
pip install .[test] | ||
- name: Lint | ||
run: flake8 src/h3 tests | ||
|
||
- name: Pylint | ||
# As a test for visibility of API bindings, we want to ensure that pylint has no | ||
# `import-error` warnings for h3 imports. | ||
run: pylint --disable=all --enable=import-error tests/ | ||
|
||
- name: Coverage | ||
run: | | ||
pip install cython | ||
cythonize tests/test_cython/cython_example.pyx | ||
pytest --cov-report=lcov | ||
- name: Report coverage | ||
uses: romeovs/[email protected] | ||
with: | ||
filter-changed-files: true | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
lcov-file: ./coverage.lcov |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,8 +3,6 @@ name: coverage-lint | |
on: | ||
push: | ||
branches: [master] | ||
pull_request: | ||
branches: ['*'] | ||
|
||
jobs: | ||
tests: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters