Skip to content

Commit 72d5daf

Browse files
committed
Optimize pre-release.yml and release.yml workflows
Signed-off-by: Brian Warner <[email protected]>
1 parent 0d66455 commit 72d5daf

File tree

2 files changed

+19
-6
lines changed

2 files changed

+19
-6
lines changed

.github/workflows/pre-release.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- name: Install dependencies
2626
run: |
2727
python -m pip install --upgrade pip
28-
python -m pip install flake8 pytest pytest-pretty
28+
python -m pip install -r requirements-dev.txt
2929
- name: Lint with flake8
3030
run: |
3131
# stop the build if there are Python syntax errors or undefined names
@@ -35,8 +35,9 @@ jobs:
3535
- name: Test with pytest
3636
run: |
3737
pytest
38+
3839
build:
39-
name: Build and test
40+
name: Build packages
4041
needs: test
4142
runs-on: ubuntu-latest
4243
steps:
@@ -52,6 +53,21 @@ jobs:
5253
- name: Build the packages
5354
run: |
5455
python -m build
56+
57+
docs:
58+
name: Test documentation build
59+
needs: test
60+
runs-on: ubuntu-latest
61+
steps:
62+
- uses: actions/checkout@v4
63+
- name: Set up Python
64+
uses: actions/setup-python@v5
65+
with:
66+
python-version: '3.12'
67+
- name: Install dependencies
68+
run: |
69+
python -m pip install --upgrade pip
70+
python -m pip install -r requirements-dev.txt
5571
- name: Test documentation build
5672
run: |
5773
sphinx-build -b html docsrc docs -E -d "docsrc/_doctrees"

.github/workflows/release.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555

5656
deploy-docs:
5757
name: Deploy documentation to GitHub Pages
58-
needs: pypi-publish
58+
needs: test
5959
runs-on: ubuntu-latest
6060
permissions:
6161
contents: read
@@ -75,9 +75,6 @@ jobs:
7575
run: |
7676
python -m pip install --upgrade pip
7777
python -m pip install -r requirements-dev.txt
78-
- name: Build the packages
79-
run: |
80-
python -m build
8178
- name: Generate documentation
8279
run: |
8380
sphinx-build -b html docsrc docs -E -d "docsrc/_doctrees"

0 commit comments

Comments
 (0)