Skip to content

Commit

Permalink
use workflow_call instead of workflow_run
Browse files Browse the repository at this point in the history
  • Loading branch information
MAfarrag committed Dec 7, 2024
1 parent b235cae commit 7cd57cb
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 22 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/conda-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,12 @@ jobs:
conda config --show-sources
conda config --show
pytest -sv
Trigger-Test-Notebook:
needs: Optional-packages
runs-on: ubuntu-latest
steps:
- name: Call test-jupyter-notebooks workflow
uses: ./.github/workflows/test-jupyter-notebooks.yml
with:
environment-path: test
32 changes: 10 additions & 22 deletions .github/workflows/jupyter-notebooks-examples.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,24 @@
name: test-jupyter-notebooks

on:
workflow_run:
workflows:
- conda-deployment
types:
- completed
branches:
- '**'
workflow_call:
inputs:
environment-path:
description: 'Path to the Conda environment'
required: true
secrets: inherit # Inherit secrets from the calling workflow

jobs:
Test-Jupyter-Notebooks:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
with:
mamba-version: "*"
use-mamba: true
auto-update-conda: false
auto-activate-base: false
environment-file: environment-optional-packages.yml
activate-environment: test
python-version: 3.12
channels: conda-forge,defaults
channel-priority: true
show-channel-urls: true

- name: Install dev-dependencies
- name: Activate Conda Environment
run: |
pip install .[dev] --no-deps
conda activate ${{ inputs.environment-path }}
conda info
conda list
- name: Test Jupyter Notebook
shell: bash -el {0}
Expand Down

0 comments on commit 7cd57cb

Please sign in to comment.