Skip to content

Commit

Permalink
Add coverage file, update test yml
Browse files Browse the repository at this point in the history
  • Loading branch information
b-j-mills committed Nov 19, 2024
1 parent 7784775 commit 623d4b9
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 7 deletions.
14 changes: 14 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[run]
relative_files = True

[report]
omit =
*/run.py
*/python?.?/*
*/venv/*
*/site-packages/*
*/tests/*
*__init__*

exclude_lines =
if __name__ == '__main__':
21 changes: 14 additions & 7 deletions .github/workflows/run-python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,25 @@

name: Run tests

on: [push, pull_request]
on:
workflow_dispatch: # add run button in github
push:
branches-ignore:
- gh-pages
pull_request:
branches-ignore:
- gh-pages

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.12
uses: actions/setup-python@v2
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
python-version: '3.x'
- name: Install GDAL
run: |
sudo apt-get update
Expand All @@ -34,11 +41,11 @@ jobs:
run: |
pytest --junitxml=junit/test-results.xml --cov-config .coveragerc --cov-report= --cov=.
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v1.6
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
files: junit/*.xml
junit_files: .tox/*.xml
- name: Publish in Coveralls
uses: AndreMiras/coveralls-python-action@develop
if: success()
Expand Down

0 comments on commit 623d4b9

Please # to comment.