Fix/issue-61 #40
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
# This workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Pull Request Checker | |
on: | |
pull_request: | |
types: [opened, synchronize] | |
workflow_dispatch: | |
jobs: | |
PR-Checker: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- uses: dorny/paths-filter@v2 | |
id: filter | |
with: | |
filters: | | |
package: | |
- 'pysubyt/**' | |
tests: | |
- 'tests/**' | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- name: Install dependencies | |
run: | | |
make init-dev | |
- name: Linting check | |
id: linting_check | |
if: ${{steps.filter.outputs.package == 'true' }} or ${{steps.filter.outputs.tests == 'true' }} | |
run: | | |
make check | |
- name: Test with pytest | |
id: pytest_test | |
if: ${{steps.filter.outputs.package == 'true' }} or ${{steps.filter.outputs.tests == 'true' }} | |
run: | | |
make test | |
- id: run-tests | |
if: ${{steps.pytest_test.outcome == 'success'}} | |
uses: JotaFan/[email protected] | |
with: | |
cov-omit-list: tests/*, *__init__*, *__version__*, *__main__*, *exceptions* | |
cov-threshold-single: 85 | |
cov-threshold-total: 90 | |
async-tests: true |