Skip to content

Commit

Permalink
CI/FIX: improve and fix actions
Browse files Browse the repository at this point in the history
[skip-pytest]
  • Loading branch information
theOehrly committed Jul 30, 2024
1 parent c8bc192 commit c26017b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ env:

jobs:
build_docs:
if: (!contains(github.event.head_commit.message, '[skip-doc-build]')) || inputs.publish
name: Build Documentation
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -76,17 +77,20 @@ jobs:
run: |
mkdir test_cache # not really need but pytest setup relies on it
cd ./docs
make clean
git rm -r * # delete all files, will be replaced with new build (don't use "make clean" as it deletes the .git folder)
make html
- name: Publish docs
if: (github.event_name == 'release') || inputs.publish
- name: Prepare docs for publishing
run: |
cd docs/_build/html
git add .
git config user.name github-actions
git config user.email [email protected]
git commit -m "$GITHUB_REF_NAME ($GITHUB_JOB) ci release"
- name: Publish docs
if: (github.event_name == 'release') || inputs.publish
run: |
git push origin gh-pages --force
- name: Upload docs as artifact
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ env:

jobs:
run-code-tests:
if: (!contains(github.event.head_commit.message, '[skip-pytest]'))
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand Down Expand Up @@ -75,6 +76,7 @@ jobs:
run-lint-checks:
if: (!contains(github.event.head_commit.message, '[skip-ruff]'))
runs-on: ubuntu-latest
name: Linting (Ruff)
steps:
Expand Down Expand Up @@ -111,6 +113,7 @@ jobs:
run-isort-test:
if: (!contains(github.event.head_commit.message, '[skip-isort]'))
name: Test import order (isort)
runs-on: ubuntu-latest

Expand Down Expand Up @@ -141,6 +144,7 @@ jobs:
python -m isort . --check-only
run-readme-render-test:
if: (!contains(github.event.head_commit.message, '[skip-readme-test]'))
name: Test readme renders on PyPi
runs-on: ubuntu-latest

Expand Down

0 comments on commit c26017b

Please sign in to comment.