Skip to content

Commit fc69959

Browse files
authored
add windows and mac to CI (#76)
1 parent 4937a69 commit fc69959

File tree

3 files changed

+21
-17
lines changed

3 files changed

+21
-17
lines changed

.github/workflows/python_package.yaml

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,48 +4,52 @@ on: [push]
44

55
jobs:
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

docs/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
gmsh==4.6.0.post2
1+
gmsh==4.10.5
22
matplotlib==3.5.1
33
numpy==1.22.0
44
pybind11==2.4.3

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
aabbtree==2.5.0
2-
matplotlib==3.3.4
2+
matplotlib==3.5.3
33
pybind11==2.4.3
44
pygmsh==7.0.2
55
MeshPy==2018.2.1

0 commit comments

Comments
 (0)