-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Chores: Update workflows, docs, and VSCode settings
Signed-off-by: Brian Warner <[email protected]>
- Loading branch information
1 parent
3b1817a
commit 2d50de4
Showing
25 changed files
with
98 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,10 +9,6 @@ on: | |
- '**' | ||
- '!main' | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
jobs: | ||
test: | ||
name: Test Python versions | ||
|
@@ -29,7 +25,7 @@ jobs: | |
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install flake8 pytest | ||
python -m pip install flake8 pytest pytest-pretty | ||
- name: Lint with flake8 | ||
run: | | ||
# stop the build if there are Python syntax errors or undefined names | ||
|
@@ -40,26 +36,33 @@ jobs: | |
run: | | ||
pytest | ||
build: | ||
name: Build and generate documentation | ||
name: Regenerate documentation | ||
needs: test | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.x' | ||
python-version: '3.12' | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install build setuptools setuptools-scm sphinx sphinx_rtd_theme myst_parser | ||
python -m pip install -r requirements-dev.txt | ||
- name: Build the packages | ||
run: | | ||
python -m build | ||
- name: Generate documentation | ||
run: | | ||
sphinx-build -b html docsrc docs -E -d "docsrc/_doctrees" | ||
- name: Check if there are any changes | ||
id: verify_diff | ||
run: | | ||
git diff --quiet . || echo "changed=true" >> $GITHUB_OUTPUT | ||
- name: Commit and push the new documentation | ||
if: steps.verify_diff.outputs.changed == 'true' | ||
run: | | ||
git config user.name "Brian Warner" | ||
git config user.email [email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Test, build, generate docs, and publish to PyPI | ||
name: Test and publish to PyPI | ||
|
||
on: | ||
push: | ||
|
@@ -21,7 +21,7 @@ jobs: | |
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install flake8 pytest | ||
python -m pip install flake8 pytest pytest-pretty | ||
- name: Lint with flake8 | ||
run: | | ||
# stop the build if there are Python syntax errors or undefined names | ||
|
@@ -32,35 +32,23 @@ jobs: | |
run: | | ||
pytest | ||
pypi-publish: | ||
name: Upload release to PyPI and update documentation | ||
name: Upload release to PyPI | ||
needs: test | ||
runs-on: ubuntu-latest | ||
environment: release | ||
permissions: | ||
id-token: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.x' | ||
python-version: '3.12' | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install build setuptools setuptools-scm sphinx sphinx_rtd_theme myst_parser | ||
python -m pip install -r requirements-dev.txt | ||
- name: Build the packages | ||
run: | | ||
python -m build | ||
- name: Publish package distributions to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
- name: Generate documentation with latest version | ||
run: | | ||
sphinx-build -b html docsrc docs -E -d "docsrc/_doctrees" | ||
- name: Commit and push the new documentation | ||
if: steps.verify_diff.outputs.changed == 'true' | ||
run: | | ||
git config user.name "Brian Warner" | ||
git config user.email [email protected] | ||
git add docs | ||
git commit -m "Rebuild the documentation" || exit 0 | ||
git push |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,3 +17,4 @@ build: clean test | |
|
||
html: build | ||
sphinx-build -b html docsrc docs -E -d "docsrc/_doctrees" | ||
touch docs/.nojekyll |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Sphinx build info version 1 | ||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. | ||
config: cfee92e6764fd6783006a9379d7eb90c | ||
# This file records the configuration used when building these files. When it is not found, a full rebuild will be done. | ||
config: 84312769acdb3225cceb4714f4036a2f | ||
tags: 645f666f9bcd5a90fca523b33c5a78b7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Sphinx build info version 1 | ||
# This file records the configuration used when building these files. When it is not found, a full rebuild will be done. | ||
config: c275350ed3fba61546b0b0ef51753182 | ||
tags: 645f666f9bcd5a90fca523b33c5a78b7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.