config/dotfile consolidation #698
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
# This workflow installs the package dependencies, lints the package, and | |
# executes the package tests. | |
# For more details: https://docs.github.com/en/actions/guides/building-and-testing-python | |
name: Run tests | |
on: | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ['3.8', '3.9', '3.10', '3.11'] | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
# fetch all tags so `versioneer` can properly determine current version | |
fetch-depth: 0 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
miniforge-variant: Mambaforge | |
channels: conda-forge | |
channel-priority: true | |
activate-environment: rubicon-ml-tests | |
- name: Install rubicon-ml | |
run: | | |
pip install -e '.[tests]' | |
- name: Check formatting with black | |
run: | | |
black --check rubicon_ml/ tests/ | |
- name: Check imports with isort | |
run: | | |
isort -c rubicon_ml/ tests/ | |
- name: Lint with flake8 | |
run: | | |
flake8 rubicon_ml/ tests/ | |
- name: Validate build | |
run: | | |
python -m build . --wheel | |
pip install dist/rubicon_ml-*.whl | |
- name: Test with pytest | |
run: | | |
pytest -m 'not run_notebooks and not write_files' |