Merge pull request #14 from jmbannon/test2

Add github workflows for tests
This commit is contained in:
Jesse Bannon 2022-04-29 01:11:21 -07:00 committed by GitHub
commit 47438865af
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 6 deletions

View file

@ -1,4 +1,4 @@
name: Pylint name: ytld-sub build, lint, test
on: [push] on: [push]
@ -17,7 +17,10 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: | run: |
python -m pip install --upgrade pip python -m pip install --upgrade pip
pip install .[lint] pip install .[lint,test]
- name: Run linters - name: Run linters
run: | run: |
./tools/linter check ./tools/linter check
- name: Run tests with coverage
run: |
./tools/test

View file

@ -1,4 +1,4 @@
# Uncomment to build api docs # 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 sphinx-build -a -b html docs docs/_html

View file

@ -1,6 +1,6 @@
# Run within root directory # Run within root directory
if [ $1 = "check" ]; then if [[ $1 = "check" ]]; then
isort . --check-only --diff \ isort . --check-only --diff \
&& black . --check \ && black . --check \
&& pylint src/ \ && pylint src/ \

View file

@ -1,2 +1,8 @@
# Run within root folder. Runs tests with coverage, and reports it to html # Run within root directory
coverage run -m pytest && coverage html
if [[ $1 = "html" ]]; then
coverage run -m pytest && coverage html
else
coverage run -m pytest && coverage report
fi