Update documentation in math.py and added tests in test_math.py #31
Workflow file for this run
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
name: Build PyPI README | |
# Required so the Actions token can push code back to the repo | |
permissions: | |
contents: write | |
on: | |
push: | |
branches: ["develop"] | |
pull_request: | |
branches: ["develop"] | |
jobs: | |
build-readme: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
with: | |
persist-credentials: true # Ensures we can push changes | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
- name: Install dependencies | |
run: | | |
pip install --upgrade pip | |
# (Optional) pip install -r requirements.txt | |
- name: Generate PyPI README | |
run: | | |
python assets/strip_gh_only_blocks.py | |
ls -lah README-pypi.md # Confirm file is generated | |
- name: Commit and push changes | |
run: | | |
# Configure git | |
git config user.name "github-actions" | |
git config user.email "[email protected]" | |
# Stage the new/updated README-pypi.md | |
git add README-pypi.md | |
# Commit only if there are changes | |
if ! git diff --cached --exit-code; then | |
git commit -m "Auto-update README-pypi.md" | |
git push origin HEAD:develop | |
else | |
echo "No changes to commit." | |
fi |