From a25b45c664a857da73d2150cdcbb1d0a7bc3cc76 Mon Sep 17 00:00:00 2001 From: Remco de Boer Date: Tue, 15 Jun 2021 21:04:02 +0200 Subject: [PATCH] ci: extract git diff on docs --- .github/workflows/ci-tests.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index f9705ef6..d171cdc5 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -20,6 +20,13 @@ jobs: python-version: [3.7] steps: - uses: actions/checkout@master + - name: Check modified notebooks + id: git-diff + run: + echo "::set-output name=dependency-changes::$(git diff --name-only + origin/$GITHUB_BASE_REF -- docs | grep ipynb)" + - name: Show modified notebooks + run: echo ${{ steps.git-diff.outputs.dependency-changes }} - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@master with: @@ -30,8 +37,6 @@ jobs: pip install .[test] sudo apt-get -y install graphviz - name: Run notebooks with pytest (diff only) - run: - pytest $(git diff --name-only origin/$GITHUB_BASE_REF -- docs | grep - ipynb) + run: pytest ${{ steps.git-diff.outputs.dependency-changes }} - name: Run demo notebooks run: pytest demo