-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
51cf1ef
commit 244d2cf
Showing
3 changed files
with
7 additions
and
8 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
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 |
---|---|---|
|
@@ -4,8 +4,6 @@ on: | |
push: | ||
branches: | ||
- main | ||
paths-ignore: | ||
- 'examples/smarteole_example.ipynb' | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
|
@@ -15,6 +13,7 @@ permissions: | |
|
||
env: | ||
BRANCH_NAME: ${{ github.head_ref || github.ref_name }} | ||
NOTEBOOK_UPDATE_COMMIT_MESSAGE: "Update smarteole example notebook" | ||
|
||
jobs: | ||
lint-and-test: | ||
|
@@ -53,19 +52,23 @@ jobs: | |
run: | | ||
source .venv/bin/activate | ||
pip install -U .[all] | ||
- name: 'revert temporary changes that were made on pyproject.toml' | ||
run: | | ||
sed -i 's!\["wind_up\*", "examples"\]!\["wind_up\*"\]!' pyproject.toml | ||
- name: 'lint check & test' | ||
run: | | ||
source .venv/bin/activate | ||
poe lint-check | ||
poe test | ||
- name: 'execute smarteole example notebook and push changes' | ||
if: ${{ github.event.head_commit.message }} != ${{ env.BRANCH_NAME }} | ||
run: | | ||
source .venv/bin/activate | ||
poe smarteole-nb | ||
git add -A | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
if git status | grep -q modified; then | ||
git commit -m "Update smarteole example notebook" | ||
git commit -m ${{ env.BRANCH_NAME }} | ||
git push | ||
fi |
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