-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (38 loc) · 1.36 KB
/
tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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