Fix progress indicator in offline video processing #120
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Linting & Tests | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
types: | |
- assigned | |
- unassigned | |
- labeled | |
- unlabeled | |
- opened | |
- edited | |
- reopened | |
- synchronize | |
- ready_for_review | |
- locked | |
- unlocked | |
- review_requested | |
- review_request_ | |
workflow_dispatch: | |
jobs: | |
lint: | |
name: 🕵️ Linting Check | |
runs-on: ubuntu-latest | |
# don't run workflow if pr draft | |
if: github.event.pull_request.draft == false | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.7 | |
- name: Install dependencies | |
run: | | |
echo "testing: ${{github.ref}}" | |
python -m pip install --upgrade pip | |
pip install .[dev] | |
pip install -r requirements_dev.txt | |
- name: Lint | |
run: | | |
black . --check | |
tests: | |
needs: lint | |
name: 🤖 Tests (${{ matrix.python-version }}) | |
runs-on: "ubuntu-latest" | |
# don't run workflow if pr draft | |
if: github.event.pull_request.draft == false | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.7", "3.9"] | |
steps: | |
- uses: actions/checkout@v2 | |
#setup miniconda | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
activate-environment: stytra_env | |
environment-file: environment.yml | |
python-version: ${{ matrix.python-version }} | |
auto-activate-base: false | |
# install linux libraries for display server | |
- name: Install Linux libraries | |
run: | | |
sudo apt-get install -y libdbus-1-3 libxkbcommon-x11-0 libxcb-icccm4 \ | |
libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 \ | |
libxcb-xinerama0 libxcb-xinput0 libxcb-xfixes0 | |
sudo apt-get update -qq | |
sudo apt install libxcb-xinerama0 | |
sudo apt-get install -qq --no-install-recommends \ | |
libxml2-dev libxslt1-dev gfortran libatlas-base-dev \ | |
libespeak1 libxcb-image0 libxcb-keysyms1 libxcb-render-util0 \ | |
libxkbcommon-x11-0 libxcb-icccm4 libxcb1 openssl \ | |
libxcb-randr0-dev libxcb-xtest0-dev libxcb-xinerama0-dev \ | |
libxcb-shape0-dev libxcb-xkb-dev xvfb \ | |
libopengl0 libegl1 \ | |
libpulse0 libpulse-mainloop-glib0 \ | |
gir1.2-gtk-3.0 libgirepository1.0-dev | |
#check the conda info | |
- name: Conda info | |
shell: bash -l {0} | |
run: conda info | |
#Initialize conda env | |
- name: Init | |
shell: bash -l {0} | |
run: conda init | |
#Install the dependencies in stytra env | |
- name: Dependencies | |
shell: bash -l {0} | |
run: | | |
conda activate stytra_env | |
python -m pip install --upgrade pip | |
pip install -r ./requirements_dev.txt | |
pip install .[dev] | |
#Create a server display | |
- name: Start display server | |
run: | | |
Xvfb :1 -screen 0 1024x768x16 & | |
echo "DISPLAY=:1.0" >> $GITHUB_ENV | |
#Start testing (forked makes sure each test is run in a separate process) | |
- name: Test all | |
shell: bash -l {0} | |
run: | | |
conda activate stytra_env | |
pytest -n3 --forked | |