Change version string #82
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: Dev build | |
on: push | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
# TODO need to check if this really works with conda that way | |
# strategy: | |
# matrix: | |
# python-versions: ['3.7', '3.8', '3.9', '3.10'] | |
steps: | |
- name: Set up Git repository | |
uses: actions/checkout@v2 | |
# Other Github actions to setup conda, not sure which is the best one: | |
# https://github.com/marketplace/actions/setup-miniconda | |
# --> seems to work fine | |
# https://github.com/matthewrmshin/conda-action | |
# --> No success, how to activate env? Has only 2 stars... | |
# https://github.com/marketplace/actions/setup-conda | |
# --> not tested yet | |
- name: Cache conda | |
uses: actions/cache@v2 | |
env: | |
# Increase this value to reset cache if env.yml has not changed | |
CACHE_NUMBER: 3 | |
with: | |
path: ~/conda_pkgs_dir | |
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('env.yml') }} | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
# python-version: 3.9 | |
# mamba-version: "*" | |
# channels: conda-forge | |
# TODO might be a good idea, but does not work... | |
# channel-priority: strict | |
# use Mambaforge to avoid weird conda setup issue: | |
# https://github.com/conda-incubator/setup-miniconda/issues/116#issuecomment-1384648777 | |
miniforge-variant: Mambaforge | |
miniforge-version: latest | |
activate-environment: syfop | |
environment-file: env.yml | |
# TODO does this cause troubles with finding packages? | |
# https://github.com/conda-incubator/setup-miniconda/issues/267 | |
# use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly! | |
- name: Lint wiht flake8 and black | |
shell: bash -l {0} | |
run: flake8 && black --check . | |
- name: Run unit tests (except the ones using Gurobi) | |
shell: bash -l {0} | |
run: python -m pytest --cov=. --cov-report=lcov -k "not gurobi and not cplex" tests | |
- name: Coveralls | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
path-to-lcov: coverage.lcov |