Fix version fallback mechanism #14
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 | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
# strategy: | |
# matrix: | |
# python-versions: ['3.7', '3.8', '3.9', '3.10'] | |
steps: | |
- name: Set up Git repository | |
uses: actions/checkout@v4 | |
with: | |
# unfortunately we need to fetch all tags for version.py to work | |
fetch-depth: 0 | |
- name: Fetch all Git tags | |
# this is necessary for version.py because git describe does not work on a shallow clone: | |
# https://stackoverflow.com/q/66349002/859591 | |
run: git fetch -a | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
cache: 'pip' # caching pip dependencies | |
- name: Install syfop and dependencies | |
run: | | |
sudo apt-get install graphviz graphviz-dev # for pygraphviz | |
python -m pip install --upgrade pip | |
python -m pip install -e .[dev,test,extra] | |
- name: Lint with flake8 | |
run: flake8 | |
- name: Lint with black | |
run: black --check . | |
- name: Run unit tests (except the ones using Gurobi and CPLEX) | |
run: python -m pytest --cov=. --cov-report=lcov -k "not gurobi and not cplex" tests | |
- name: Coveralls test coverage | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
path-to-lcov: coverage.lcov |