Skip to content

Commit

Permalink
ci: Workflows are now triggered on a bump commit (#428)
Browse files Browse the repository at this point in the history
* ci: Removed unnecessary ifs (we do want to deploy pages and binder branches after a release)

* chore: modified test file to trigger workflows
  • Loading branch information
Carsopre authored Apr 17, 2024
1 parent e817ff1 commit 7df07f8
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
1 change: 0 additions & 1 deletion .github/workflows/binder_branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ permissions:

jobs:
docs:
if: "!startsWith(github.event.head_commit.message, 'bump:')"
name: Checkout examples into separate directory.
runs-on: ubuntu-latest
defaults:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/deploy_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ permissions:

jobs:
docs:
if: "!startsWith(github.event.head_commit.message, 'bump:')"
name: Build (and deploy) documentation
runs-on: ubuntu-latest
defaults:
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/normalize_code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@ name: ci-normalize-code

on:
push:
branches:
- master
branches: [master]

jobs:
env:
AUTOFORMAT_COMMIT_MESSAGE: 'chore: autoformat isort & black'

jobs:
normalize-code:
env:
AUTOFORMAT_COMMIT_MESSAGE: 'chore: autoformat isort & black'
if: (github.event.head_commit.message != $AUTOFORMAT_COMMIT_MESSAGE) && ${{ (!startsWith(github.event.head_commit.message, 'bump:')) }}
name: "Normalize code with internal standards"
permissions: write-all
Expand Down
5 changes: 3 additions & 2 deletions tests/test_examples.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
from pathlib import Path

import pytest
from tests import test_examples
from pytest_notebook.execution import execute_notebook
from pytest_notebook.notebook import load_notebook

from tests import test_examples


_supported_examples = lambda x: "DIY" not in x.stem
_jupyter_examples = [
pytest.param(_jupyter_file, id=_jupyter_file.stem.replace("_", " ").capitalize())
for _jupyter_file in filter(_supported_examples, test_examples.glob("*.ipynb"))
]

import pytest

class TestExamples:
@pytest.mark.parametrize("jupyter_example", _jupyter_examples)
Expand Down

0 comments on commit 7df07f8

Please sign in to comment.