55 branches : ["main"]
66
77permissions :
8- contents : write
9- id-token : write
8+ contents : read
109 pages : write
10+ id-token : write
11+
12+ concurrency :
13+ group : " pages"
14+ cancel-in-progress : true
1115
1216jobs :
1317 unittest :
@@ -17,27 +21,29 @@ jobs:
1721 matrix :
1822 python-version : ["3.8", "3.9", "3.10", "3.11", "3.12"]
1923 steps :
20- - uses : actions/checkout@v3
21- - name : Set up Python ${{ matrix.python-version }}
22- uses : actions/setup-python@v3
23- with :
24- python-version : ${{ matrix.python-version }}
25- - name : Install dependencies
26- run : |
27- python -m pip install --upgrade pip
28- pip install pyopengl==3.1.6
29- pip install .[test]
30- - name : Test with pytest
31- run : |
32- pytest ./test/
24+ - name : Checkout repository
25+ uses : actions/checkout@v4
26+ - name : Set up Python ${{ matrix.python-version }}
27+ uses : actions/setup-python@v5
28+ with :
29+ python-version : ${{ matrix.python-version }}
30+ - name : Install dependencies
31+ run : |
32+ python -m pip install --upgrade pip
33+ pip install pyopengl==3.1.6
34+ pip install .[test]
35+ - name : Test with pytest
36+ run : pytest ./test/
37+
3338 coverage :
3439 name : Upload coverage report
3540 needs : unittest
3641 runs-on : ubuntu-latest
3742 steps :
38- - uses : actions/checkout@v3
43+ - name : Checkout repository
44+ uses : actions/checkout@v4
3945 - name : Set up Python 3.10
40- uses : actions/setup-python@v3
46+ uses : actions/setup-python@v5
4147 with :
4248 python-version : " 3.10"
4349 - name : Install dependencies
@@ -46,27 +52,28 @@ jobs:
4652 pip install pyopengl==3.1.6
4753 pip install .[test]
4854 - name : Produce coverage report
49- run : |
50- pytest --cov dm_robotics.panda --cov-report xml:coverage.xml ./test/
55+ run : pytest --cov dm_robotics.panda --cov-report xml:coverage.xml ./test/
5156 - name : Upload coverage report to Codecov
52- uses : codecov/codecov-action@v3
57+ uses : codecov/codecov-action@v4
5358 env :
5459 CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
60+
5561 linting :
5662 name : Linting
5763 needs : unittest
5864 runs-on : ubuntu-latest
5965 steps :
60- - uses : actions/checkout@v3
66+ - name : Checkout repository
67+ uses : actions/checkout@v4
6168 - name : Set up Python 3.10
62- uses : actions/setup-python@v3
69+ uses : actions/setup-python@v5
6370 with :
6471 python-version : " 3.10"
6572 - name : Install dependencies
6673 run : |
6774 python -m pip install --upgrade pip
6875 pip install .[lint]
69- - name : Lint with pylint
76+ - name : Lint with pylint and generate badge
7077 run : |
7178 mkdir ./pylint
7279 pylint --rcfile .pylintrc --output-format=text --exit-zero src/ | tee ./pylint/pylint.log
@@ -75,16 +82,18 @@ jobs:
7582 - name : Upload linting artifact
7683 uses : actions/upload-artifact@v4
7784 with :
78- name : linting
79- path : ./pylint
80- documentation :
81- name : Build documentation
85+ name : linting-badge
86+ path : ./pylint/pylint.svg
87+
88+ build-and-prepare-pages :
89+ name : Build documentation and prepare for Pages
8290 runs-on : ubuntu-latest
83- needs : unittest
91+ needs : [ unittest, linting]
8492 steps :
85- - uses : actions/checkout@v3
93+ - name : Checkout repository
94+ uses : actions/checkout@v4
8695 - name : Set up Python 3.10
87- uses : actions/setup-python@v3
96+ uses : actions/setup-python@v5
8897 with :
8998 python-version : " 3.10"
9099 - name : Install dependencies
@@ -94,33 +103,26 @@ jobs:
94103 pip install .[doc]
95104 - name : Build with Sphinx
96105 run : cd doc && make html
97- - name : Upload documentation artifact
98- uses : actions/upload-artifact@v4
99- with :
100- name : documentation
101- path : ./doc/_build/html
102- upload :
103- name : Upload to GitHub pages
104- runs-on : ubuntu-latest
105- needs : [documentation, linting]
106- steps :
107- - name : Download documentation artifact
106+ - name : Download linting badge
108107 uses : actions/download-artifact@v4
109108 with :
110- name : documentation
111- path : ./html
112- - name : Download linting artifact
113- uses : actions/download-artifact@v4
114- with :
115- name : linting
116- path : ./html
109+ name : linting-badge
110+ path : ./doc/_build/html
117111 - name : Setup Pages
118- uses : actions/configure-pages@v3
119- - name : Upload artifact
112+ uses : actions/configure-pages@v5
113+ - name : Upload artifact for GitHub Pages
120114 uses : actions/upload-pages-artifact@v3
121115 with :
122- path : ./html
116+ path : ./doc/_build/html
117+
118+ deploy :
119+ name : Deploy to GitHub Pages
120+ environment :
121+ name : github-pages
122+ url : ${{ steps.deployment.outputs.page_url }}
123+ runs-on : ubuntu-latest
124+ needs : build-and-prepare-pages
125+ steps :
123126 - name : Deploy to GitHub Pages
124127 id : deployment
125- uses : actions/deploy-pages@v3
126-
128+ uses : actions/deploy-pages@v4
0 commit comments