@@ -7,8 +7,8 @@ name: build
77on :
88 push :
99 branches : [ master, future ]
10- # pull_request:
11- # branches: [ master ]
10+ pull_request :
11+
1212
1313jobs :
1414 # Run tests on different versions of python
@@ -17,20 +17,21 @@ jobs:
1717 strategy :
1818 matrix :
1919 os : [windows-latest, ubuntu-latest, macos-latest]
20- python-version : [3.9, '3.10']
20+ python-version : ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
21+ exclude :
22+ - os : macos-latest
23+ python-version : " 3.7"
2124
2225 steps :
2326 - uses : actions/checkout@v2
2427 - name : Set up Python ${{ matrix.python-version }}
25- uses : actions/setup-python@v1
28+ uses : actions/setup-python@v5
2629 with :
2730 python-version : ${{ matrix.python-version }}
2831 - name : Install dependencies
2932 run : |
3033 python -m pip install --upgrade pip
3134 pip install .[dev]
32- pip install pytest-timeout
33- pip install pytest-xvfb
3435 - name : Test with pytest
3536 env :
3637 MPLBACKEND : TkAgg
@@ -45,20 +46,18 @@ jobs:
4546 steps :
4647 - uses : actions/checkout@v2
4748 - name : Set up Python 3.7
48- uses : actions/setup-python@v1
49+ uses : actions/setup-python@v5
4950 with :
5051 python-version : 3.7
5152 - name : Install dependencies
5253 run : |
5354 python -m pip install --upgrade pip
55+ pip install .[dev]
5456 - name : Run coverage
5557 run : |
56- pip install .[dev]
57- pip install pytest-xvfb
58- pip install pytest-timeout
59- pytest --cov --cov-config=./spatialmath/.coveragerc --cov-report xml
60- #pytest --cov=spatialmath --cov-report xml
58+ coverage run --omit='tests/*.py,tests/base/*.py' -m pytest
6159 coverage report
60+ coverage xml
6261 - name : upload coverage to Codecov
6362 uses : codecov/codecov-action@v3
6463 with :
6766 # If the above worked:
6867 # Build docs and upload to GH Pages
6968 needs : unittest
70- runs-on : ubuntu-latest
71- steps :
72- - uses : actions/checkout@v2
73- - name : Set up Python 3.7
74- uses : actions/setup-python@v1
75- with :
76- python-version : 3.7
77- - name : Install dependencies
78- run : |
79- python -m pip install --upgrade pip
80- pip install .[dev,docs]
81- pip install git+https://github.com/petercorke/sphinx-autorun.git
82- pip install sympy
83- sudo apt-get install graphviz
84- - name : Build docs
85- run : |
86- cd docs
87- make html
88- # Tell GitHub not to use jekyll to compile the docs
89- touch build/html/.nojekyll
90- cd ../
91- - name : Commit documentation changes
92- run : |
93- git clone https://github.com/petercorke/spatialmath-python.git --branch gh-pages --single-branch gh-pages
94- cp -r docs/build/html/* gh-pages/
95- cd gh-pages
96- git config --local user.email "action@github.com"
97- git config --local user.name "GitHub Action"
98- git add .
99- git commit -m "Update documentation" -a || true
100- # The above command will fail if no changes were present, so we ignore
101- # that.
102- - name : Push changes
103- uses : ad-m/github-push-action@master
104- with :
105- branch : gh-pages
106- directory : gh-pages
107- github_token : ${{ secrets.GITHUB_TOKEN }}
69+ uses : ./.github/workflows/sphinx.yml
0 commit comments