Tidying up after some recent PRs #1237
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: Examples | |
on: pull_request | |
jobs: | |
build: | |
runs-on: ${{ matrix.operating-system }} | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
fail-fast: false | |
max-parallel: 5 | |
matrix: | |
python-version: ['3.8'] | |
operating-system: [ubuntu-latest] | |
# Next line should be [1, 2, ..., max-parallel) | |
test_group: [1, 2, 3, 4, 5] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: FedericoCarboni/setup-ffmpeg@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Cache pip | |
uses: actions/cache@v2 | |
with: | |
# This path is specific to Ubuntu | |
path: ~/.cache/pip | |
# Look to see if there is a cache hit for the corresponding requirements file | |
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
${{ runner.os }}- | |
- name: Install dependencies (pip) | |
run: | | |
pip install -r requirements.txt | |
pip install -r requirements/tests.txt | |
pip install -r requirements/examples.txt | |
- name: Running tests | |
# Make sure to pass max-parallel to --splits | |
run: | | |
pytest examples/ \ | |
--nbval-lax \ | |
--splits ${{ strategy.max-parallel}} \ | |
--group ${{ matrix.test_group }} \ | |
--durations-path test/fixtures/.test_durations_examples \ | |
--suppress-no-test-exit-code # so if no tests collected, CI won't break |