Skip to content

test support python 3.11 #1136

test support python 3.11

test support python 3.11 #1136

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
defaults:
run:
shell: bash -l {0}
jobs:
nb-sync:
runs-on: ubuntu-latest
steps:
- name: Clone repo
uses: actions/checkout@v2
- name: Set up python
uses: actions/setup-python@v2
- name: Install nbdev
run: pip install nbdev
- name: Check if all notebooks are cleaned
run: |
echo "Check we are starting with clean git checkout"
if [ -n "$(git status -uno -s)" ]; then echo "git status is not clean"; false; fi
echo "Trying to strip out notebooks"
nbdev_clean
echo "Check that strip out was unnecessary"
git status -s # display the status to see which nbs need cleaning up
if [ -n "$(git status -uno -s)" ]; then echo -e "!!! Detected unstripped out notebooks\n!!!Remember to run nbdev_install_git_hooks"; false; fi
run-tests:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.7, 3.8, 3.9, '3.10', '3.11']
steps:
- name: Clone repo
uses: actions/checkout@v2
- name: Set up environment
uses: mamba-org/provision-with-micromamba@main
with:
environment-file: dev/environment.yml
extra-specs: python=${{ matrix.python-version }}
cache-env: true
- name: Install pip requirements
run: pip install ./
- name: Run tests on windows
if: ${{ matrix.os == 'windows-latest' }} #until nbdev fix
run: nbdev_test --skip_file_re '(models|distributed|ets).*.ipynb' --pause 1.0
- name: Run tests
if: ${{ matrix.os != 'windows-latest' }}
run: nbdev_test --skip_file_re '(distributed).*.ipynb' --pause 1.0
- name: Run integration tests
if: ${{ matrix.os != 'windows-latest' }}
run: |
pip install ".[dev]" pytest
pytest action_files
test-m3-performance:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Clone repo
uses: actions/checkout@v2
- name: Set up environment
uses: mamba-org/provision-with-micromamba@main
with:
environment-file: dev/environment.yml
extra-specs: python=3.10
cache-env: true
- name: Install library and extra deps
run: pip install ".[dev]" fire
- name: Run M3 experiment
run: |
python -m src.experiment
python -m src.evaluation --test
working-directory: ./experiments/m3