update
This commit is contained in:
@@ -2,9 +2,15 @@ name: Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
paths:
|
||||
- "src/**"
|
||||
- "tests/**"
|
||||
pull_request:
|
||||
branches: [master]
|
||||
paths:
|
||||
- "src/**"
|
||||
- "tests/**"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
@@ -34,11 +40,11 @@ jobs:
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -e .
|
||||
pip install pytest pytest-cov pytest-mock flake8 black isort
|
||||
pip install pytest pytest-cov pytest-mock flake8 black isort ffsubsync guessit responses
|
||||
|
||||
- name: Lint with flake8
|
||||
run: |
|
||||
flake8 src/jimaku_dl
|
||||
flake8 src/jimaku_dl --max-line-length 88
|
||||
|
||||
- name: Check formatting with black
|
||||
run: |
|
||||
@@ -50,10 +56,18 @@ jobs:
|
||||
|
||||
- name: Test with pytest
|
||||
run: |
|
||||
pytest --cov=jimaku_dl --cov-report=xml
|
||||
pytest --cov-branch --cov=jimaku_dl --cov-report=xml
|
||||
pytest --cov --junitxml=junit.xml -o junit_family=legacy
|
||||
|
||||
- name: Upload coverage to Codecov
|
||||
uses: codecov/codecov-action@v3
|
||||
with:
|
||||
file: ./coverage.xml
|
||||
fail_ci_if_error: false
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
|
||||
- name: Upload test results to Codecov
|
||||
if: ${{ !cancelled() }}
|
||||
uses: codecov/test-results-action@v1
|
||||
with:
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
|
||||
Reference in New Issue
Block a user