Make runners configurable from the command-line using OmegaConf
#203
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: Tests | |
on: | |
push: | |
branches: | |
- "main" | |
pull_request: | |
branches: | |
- "*" | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
test: | |
strategy: | |
matrix: | |
os: ["ubuntu-latest", "macos-latest", "windows-latest"] | |
python-version: ["3.9", "3.10", "3.11"] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v2 | |
- name: Set up python | |
id: setup-python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Poetry | |
id: install-poetry | |
uses: snok/install-poetry@v1.3.4 | |
with: | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
installer-parallel: true | |
- name: Load cached poetry dependencies | |
id: cached-poetry-dependencies | |
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' | |
uses: actions/cache@v3 | |
with: | |
path: .venv | |
key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }} | |
restore-keys: | | |
venv-${{ runner.os }} | |
- name: Install Conda for liblsl | |
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
auto-activate-base: true | |
activate-environment: "" | |
- name: Install liblsl | |
run: | | |
if [ "$RUNNER_OS" == "Linux" ]; then | |
curl -OL https://github.com/sccn/liblsl/releases/download/v1.16.1/liblsl-1.16.1-focal_amd64.deb | |
sudo apt install -y ./liblsl-1.16.1-focal_amd64.deb | |
elif [ "$RUNNER_OS" == "macOS" ]; then | |
curl -OL https://github.com/sccn/liblsl/releases/download/v1.16.1/liblsl-1.16.1-OSX_amd64.tar.bz2 | |
tar xvf liblsl-1.16.1-OSX_amd64.tar.bz2 | |
echo "PYLSL_LIB=$PWD/lib/liblsl.dylib" >> $GITHUB_ENV | |
elif [ "$RUNNER_OS" == "Windows" ]; then | |
echo "liblsl will be installed by poetry" | |
else | |
echo "$RUNNER_OS not supported" | |
exit 1 | |
fi | |
- name: Install dependencies | |
run: poetry install --no-interaction --no-root | |
- name: Install library | |
run: poetry install --no-interaction | |
- name: Run tests | |
run: | | |
if [ "$RUNNER_OS" == "Windows" ]; then | |
poetry run pytest . -m "not jitter" | |
else | |
make test-coverage | |
fi | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v3 | |
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.10' |