Merge pull request #14 from jmbannon/test2
Add github workflows for tests
This commit is contained in:
commit
47438865af
4 changed files with 15 additions and 6 deletions
|
|
@ -1,4 +1,4 @@
|
|||
name: Pylint
|
||||
name: ytld-sub build, lint, test
|
||||
|
||||
on: [push]
|
||||
|
||||
|
|
@ -17,7 +17,10 @@ jobs:
|
|||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install .[lint]
|
||||
pip install .[lint,test]
|
||||
- name: Run linters
|
||||
run: |
|
||||
./tools/linter check
|
||||
- name: Run tests with coverage
|
||||
run: |
|
||||
./tools/test
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
# Uncomment to build api docs
|
||||
# sphinx-apidoc -f -o docs/source ytdl_subscribea
|
||||
# sphinx-apidoc -f -o docs/source src/ytdl_sub
|
||||
sphinx-build -a -b html docs docs/_html
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# Run within root directory
|
||||
|
||||
if [ $1 = "check" ]; then
|
||||
if [[ $1 = "check" ]]; then
|
||||
isort . --check-only --diff \
|
||||
&& black . --check \
|
||||
&& pylint src/ \
|
||||
|
|
|
|||
10
tools/test
10
tools/test
|
|
@ -1,2 +1,8 @@
|
|||
# Run within root folder. Runs tests with coverage, and reports it to html
|
||||
coverage run -m pytest && coverage html
|
||||
# Run within root directory
|
||||
|
||||
if [[ $1 = "html" ]]; then
|
||||
coverage run -m pytest && coverage html
|
||||
else
|
||||
coverage run -m pytest && coverage report
|
||||
fi
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue