@@ -4,48 +4,52 @@ on: [push]
44
55jobs :
66 pytest :
7- name : pytest for py${{ matrix.python-version }}
7+ name : pytest for py${{ matrix.python-version }} on ${{ matrix.os }}
88
9- runs-on : ubuntu-latest
9+ runs-on : ${{ matrix.os }}
1010 strategy :
1111 matrix :
1212 python-version : [3.8, 3.9, '3.10']
13+ os : ['ubuntu-latest', 'macos-latest', 'windows-latest']
1314
1415 steps :
1516 - uses : actions/checkout@v2
1617 - name : Set up Python ${{ matrix.python-version }}
1718 uses : actions/setup-python@v2
1819 with :
1920 python-version : ${{ matrix.python-version }}
20- - name : Install gmsh
21- run : |
22- sudo apt-get install -y python3-gmsh
21+
22+ - name : Setup Ubuntu environment
23+ if : startsWith(matrix.os, 'ubuntu')
24+ run : sudo apt-get install -y python3-gmsh libglu1
25+ - name : Setup MacOS environment
26+ if : startsWith(matrix.os, 'macos')
27+ run : brew install gmsh
28+
2329 - name : Install test dependencies
2430 run : |
2531 python -m pip install --upgrade pip
2632 pip install setuptools wheel
2733 pip install flake8 pytest pytest-cov coveralls
28- - name : Setup Linux Environment
29- run : |
30- sudo apt-get install libglu1
34+ - name : Install package requirements
35+ run : pip install -r requirements.txt
3136 - name : Install package
32- run : |
33- if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
34- pip install -e .
37+ run : pip install -e .
38+
3539 - name : Lint with flake8
3640 run : |
3741 # stop the build if there are Python syntax errors or undefined names
3842 flake8 src tests setup.py --exclude=__init__.py --count --select=E9,F63,F7,F82 --show-source --statistics
3943 # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
4044 flake8 src tests setup.py --exclude=__init__.py --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
4145 - name : Test with pytest
42- run : |
43- pytest --cov=src tests/
46+ run : pytest --cov=src tests/
47+
4448 - name : Coveralls
4549 env :
4650 COVERALLS_REPO_TOKEN : ${{ secrets.COVERALLS_REPO_TOKEN }}
47- run : |
48- coveralls
51+ COVERALLS_FLAG_NAME : py${{ matrix.python-version }} on ${{ matrix.os }}
52+ run : coveralls
4953
5054 package-checks :
5155 name : package checks
0 commit comments