Skip to content

Tests

Tests #2

Workflow file for this run

name: Test Benchmark
on:
push:
branches:
- main
create:
tags:
- '**'
pull_request:
branches:
- main
schedule:
# Run every day at 7:42am UTC.
- cron: '42 7 * * *'
jobs:
test-benchmark:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ['ubuntu-latest', 'macos-latest']
exclude:
# Only run OSX test on version==git, not on the release ones.
- os: ${{ inputs.benchopt_version == 'git' || 'macos-latest' }}
env:
CONDA_ENV: 'test_env'
BENCHOPT_BRANCH: ${{ inputs.benchopt_branch }}
BENCHOPT_VERSION: ${{ inputs.benchopt_version }}
BENCHOPT_DEBUG: 1
BENCHOPT_CONDA_CMD: mamba
SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL: True
defaults:
run:
# Need to use this shell to get conda working properly.
# See https://github.com/marketplace/actions/setup-miniconda#important
shell: bash -l {0}
steps:
- uses: actions/checkout@v2
- name: Setup Conda
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
miniforge-variant: Mambaforge
use-mamba: true
channels: conda-forge
python-version: 3.9
activate-environment: ${{ env.CONDA_ENV }}
- run: conda info
- name: Install benchopt and its dependencies
run: |
conda info
mamba install -yq pip
# Get the correct branch of benchopt
if [[ "$BENCHOPT_VERSION" == "git" ]]
then
user=${BENCHOPT_BRANCH%@*}
branch=${BENCHOPT_BRANCH##*@}
pip install -U git+https://github.com/$user/benchopt@$branch
elif [[ "$BENCHOPT_VERSION" == "latest" ]]
then
pip install -U benchopt
else
pip install -U benchopt==$BENCHOPT_VERSION
fi
- name: FLamby
run: |
git clone https://github.com/owkin/FLamby.git
cd FLamby
pip install -e "[all_extra]"
- name: Test
run: |
benchopt test .
benchopt test . --skip-install