Cleanup pipeline
This commit is contained in:
parent
bb7d0a332d
commit
6f07273482
1 changed files with 15 additions and 10 deletions
25
.github/workflows/tests.yml
vendored
25
.github/workflows/tests.yml
vendored
|
|
@ -17,7 +17,6 @@ jobs:
|
||||||
name: 'Linux - Python'
|
name: 'Linux - Python'
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
# '3.7' -> E ImportError: cannot import name 'InvalidStateError' from 'concurrent.futures' (/opt/hostedtoolcache/Python/3.7.13/x64/lib/python3.7/concurrent/futures/__init__.py)
|
|
||||||
python-version: [ '3.8', '3.9', '3.10' ]
|
python-version: [ '3.8', '3.9', '3.10' ]
|
||||||
env:
|
env:
|
||||||
DISPLAY: :0
|
DISPLAY: :0
|
||||||
|
|
@ -32,18 +31,21 @@ jobs:
|
||||||
- name: 'Update Packages'
|
- name: 'Update Packages'
|
||||||
run: |
|
run: |
|
||||||
function execute() { echo -e "\033[0;34m$*\033[0m"; "$@"; }
|
function execute() { echo -e "\033[0;34m$*\033[0m"; "$@"; }
|
||||||
|
|
||||||
execute sudo apt update -y && sudo apt upgrade -y
|
execute sudo apt update -y && sudo apt upgrade -y
|
||||||
- name: 'Install Dependencies'
|
- name: 'Install Dependencies'
|
||||||
run: |
|
run: |
|
||||||
function execute() { echo -e "\033[0;34m$*\033[0m"; "$@"; }
|
function execute() { echo -e "\033[0;34m$*\033[0m"; "$@"; }
|
||||||
|
|
||||||
execute sudo apt install -y libmpv1 xvfb
|
execute sudo apt install -y libmpv1 xvfb
|
||||||
- name: 'Start Xvfb'
|
- name: 'Start Xvfb'
|
||||||
run: |
|
run: |
|
||||||
echo -e "\033[0;34msudo /usr/bin/Xvfb $DISPLAY -screen 0 1920x1080x24 &\033[0m";
|
echo -e "\033[0;34msudo /usr/bin/Xvfb $DISPLAY -screen 0 1920x1080x24 &\033[0m";
|
||||||
sudo /usr/bin/Xvfb $DISPLAY -screen 0 1920x1080x24 &
|
sudo /usr/bin/Xvfb $DISPLAY -screen 0 1920x1080x24 &
|
||||||
- name: 'Create Virtual Environment'
|
- name: 'Setup Test Environment'
|
||||||
run: |
|
run: |
|
||||||
function execute() { echo -e "\033[0;34m$*\033[0m"; "$@"; }
|
function execute() { echo -e "\033[0;34m$*\033[0m"; "$@"; }
|
||||||
|
|
||||||
execute python -m venv venv
|
execute python -m venv venv
|
||||||
execute source venv/bin/activate
|
execute source venv/bin/activate
|
||||||
execute python -m pip install --upgrade pip
|
execute python -m pip install --upgrade pip
|
||||||
|
|
@ -52,6 +54,7 @@ jobs:
|
||||||
- name: 'Run Python Tests'
|
- name: 'Run Python Tests'
|
||||||
run: |
|
run: |
|
||||||
function execute() { echo -e "\033[0;34m$*\033[0m"; "$@"; }
|
function execute() { echo -e "\033[0;34m$*\033[0m"; "$@"; }
|
||||||
|
|
||||||
execute source venv/bin/activate
|
execute source venv/bin/activate
|
||||||
execute xvfb-run python -m pytest
|
execute xvfb-run python -m pytest
|
||||||
|
|
||||||
|
|
@ -67,14 +70,6 @@ jobs:
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
- name: 'Setup Build Environment'
|
|
||||||
run: |
|
|
||||||
function execute() { echo -e "\033[0;34m$*\033[0m"; "$@"; }
|
|
||||||
execute python -m venv venv
|
|
||||||
execute source venv/Scripts/activate
|
|
||||||
execute python -m pip install --upgrade pip
|
|
||||||
execute python -m pip install wheel
|
|
||||||
execute python -m pip install -r tests/requirements.txt
|
|
||||||
- name: 'Provide libmpv'
|
- name: 'Provide libmpv'
|
||||||
run: |
|
run: |
|
||||||
function execute() { echo -e "\033[0;34m$*\033[0m"; "$@"; }
|
function execute() { echo -e "\033[0;34m$*\033[0m"; "$@"; }
|
||||||
|
|
@ -85,8 +80,18 @@ jobs:
|
||||||
execute curl -L -O "$URL"
|
execute curl -L -O "$URL"
|
||||||
execute 7z x "$ARTIFACT"
|
execute 7z x "$ARTIFACT"
|
||||||
execute mv mpv-2.dll tests
|
execute mv mpv-2.dll tests
|
||||||
|
- name: 'Setup Test Environment'
|
||||||
|
run: |
|
||||||
|
function execute() { echo -e "\033[0;34m$*\033[0m"; "$@"; }
|
||||||
|
|
||||||
|
execute python -m venv venv
|
||||||
|
execute source venv/Scripts/activate
|
||||||
|
execute python -m pip install --upgrade pip
|
||||||
|
execute python -m pip install wheel
|
||||||
|
execute python -m pip install -r tests/requirements.txt
|
||||||
- name: 'Run Python Tests'
|
- name: 'Run Python Tests'
|
||||||
run: |
|
run: |
|
||||||
function execute() { echo -e "\033[0;34m$*\033[0m"; "$@"; }
|
function execute() { echo -e "\033[0;34m$*\033[0m"; "$@"; }
|
||||||
|
|
||||||
execute source venv/Scripts/activate
|
execute source venv/Scripts/activate
|
||||||
execute python -m pytest
|
execute python -m pytest
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue