From a9cc4f5cc316315cab13d9c5b5f8be888b43311b 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 | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index f9705ef6..308cbb8a 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -20,6 +20,12 @@ jobs: python-version: [3.7] steps: - uses: actions/checkout@master + - run: git fetch origin + - 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: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@master with: @@ -30,8 +36,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