mirror of
https://github.com/pkkid/python-plexapi
synced 2024-11-22 19:53:17 +00:00
Activate venv in required steps
This commit is contained in:
parent
053989a837
commit
4916c595b2
1 changed files with 8 additions and 10 deletions
18
.github/workflows/ci.yaml
vendored
18
.github/workflows/ci.yaml
vendored
|
@ -81,11 +81,9 @@ jobs:
|
|||
echo "Failed to restore Python virtual environment from cache"
|
||||
exit 1
|
||||
|
||||
- name: Activate Python ${{ env.DEFAULT_PYTHON }} virtual environment
|
||||
run: . venv/bin/activate
|
||||
|
||||
- name: Lint with flake8
|
||||
run: |
|
||||
. venv/bin/activate
|
||||
# stop the build if there are Python syntax errors or undefined names
|
||||
flake8 plexapi --count --select=E9,F63,F7,F82 --show-source --statistics
|
||||
# The GitHub editor is 127 chars wide
|
||||
|
@ -138,9 +136,6 @@ jobs:
|
|||
echo "Failed to restore Python virtual environment from cache"
|
||||
exit 1
|
||||
|
||||
- name: Activate Python ${{ matrix.python-version }} virtual environment
|
||||
run: . venv/bin/activate
|
||||
|
||||
- name: Get PMS Docker image digest
|
||||
id: docker-digest
|
||||
run: |
|
||||
|
@ -187,6 +182,7 @@ jobs:
|
|||
|
||||
- name: Bootstrap ${{ matrix.plex }} Plex server
|
||||
run: |
|
||||
. venv/bin/activate
|
||||
python \
|
||||
-u tools/plex-bootstraptest.py \
|
||||
--destination plex \
|
||||
|
@ -199,6 +195,7 @@ jobs:
|
|||
env:
|
||||
TEST_ACCOUNT_ONCE: ${{ matrix.plex == 'unclaimed' }}
|
||||
run: |
|
||||
. venv/bin/activate
|
||||
pytest \
|
||||
-rxXs \
|
||||
--ignore=tests/test_sync.py \
|
||||
|
@ -215,6 +212,7 @@ jobs:
|
|||
PLEXAPI_HEADER_PLATFORM_VERSION: 11.4.1
|
||||
PLEXAPI_HEADER_DEVICE: iPhone
|
||||
run: |
|
||||
. venv/bin/activate
|
||||
pytest \
|
||||
-rxXs \
|
||||
--tb=native \
|
||||
|
@ -225,7 +223,9 @@ jobs:
|
|||
|
||||
- name: Unlink PMS from MyPlex account
|
||||
if: matrix.plex == 'claimed' && always()
|
||||
run: python -u tools/plex-teardowntest.py
|
||||
run: |
|
||||
. venv/bin/activate
|
||||
python -u tools/plex-teardowntest.py
|
||||
|
||||
- name: Upload coverage artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
|
@ -267,14 +267,12 @@ jobs:
|
|||
echo "Failed to restore Python virtual environment from cache"
|
||||
exit 1
|
||||
|
||||
- name: Activate Python ${{ env.DEFAULT_PYTHON }} virtual environment
|
||||
run: . venv/bin/activate
|
||||
|
||||
- name: Download all coverage artifacts
|
||||
uses: actions/download-artifact@v2
|
||||
|
||||
- name: Combine coverage results
|
||||
run: |
|
||||
. venv/bin/activate
|
||||
coverage combine coverage*/.coverage*
|
||||
coverage report --fail-under=50
|
||||
coverage xml
|
||||
|
|
Loading…
Reference in a new issue