From 4b0067045f247df8dc0562604dac11b0461f1206 Mon Sep 17 00:00:00 2001 From: vuillaut Date: Thu, 10 Jun 2021 15:24:32 +0200 Subject: [PATCH 01/11] testing in two steps --- .github/workflows/python-package-conda.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml index fe40259..d080e19 100644 --- a/.github/workflows/python-package-conda.yml +++ b/.github/workflows/python-package-conda.yml @@ -4,7 +4,14 @@ on: [push, pull_request] jobs: + test_env_change: + runs-on: ubuntu-latest + uses: tj-actions/verify-changed-files@v6.2 + with: + files: | + environment.yml build: + if: steps.verify-changed-files.outputs.files_changed == 'true' runs-on: ${{ matrix.os }} strategy: max-parallel: 5 @@ -15,10 +22,6 @@ jobs: - uses: actions/checkout@v2 with: submodules: recursive - - uses: tj-actions/verify-changed-files@v6.2 - with: - files: | - environment.yml - uses: conda-incubator/setup-miniconda@v2 with: auto-update-conda: true @@ -31,7 +34,6 @@ jobs: conda info - name: Install dependencies - if: steps.verify-changed-files.outputs.files_changed == 'true' shell: bash -leo pipefail {0} run: | conda install mamba -n base -c conda-forge From 3ac3c1ec940d7b87b231dfe9842d23f8cc35ca05 Mon Sep 17 00:00:00 2001 From: vuillaut Date: Thu, 10 Jun 2021 15:27:07 +0200 Subject: [PATCH 02/11] same for skhep --- .github/workflows/conda-skhep.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/conda-skhep.yml b/.github/workflows/conda-skhep.yml index e52f0b7..e30a4f4 100644 --- a/.github/workflows/conda-skhep.yml +++ b/.github/workflows/conda-skhep.yml @@ -4,7 +4,14 @@ on: [push, pull_request] jobs: + test_env_change: + runs-on: ubuntu-latest + uses: tj-actions/verify-changed-files@v6.2 + with: + files: | + scikit-hep/environment.yml build: + if: steps.verify-changed-files.outputs.files_changed == 'true' runs-on: ${{ matrix.os }} strategy: max-parallel: 5 From ab2194038b95f3d1b98e11f2a9000f16acdda808 Mon Sep 17 00:00:00 2001 From: vuillaut Date: Thu, 10 Jun 2021 15:29:52 +0200 Subject: [PATCH 03/11] check if changes in slides to build them --- .github/workflows/build-slides.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/build-slides.yml b/.github/workflows/build-slides.yml index 9885049..0534103 100644 --- a/.github/workflows/build-slides.yml +++ b/.github/workflows/build-slides.yml @@ -3,7 +3,15 @@ name: Build LaTeX Slides on: [push, pull_request] jobs: + test_slides_change: + runs-on: ubuntu-latest + uses: tj-actions/verify-changed-files@v6.2 + with: + files: | + packaging/slides/* + testing/slides/* build-slides: + if: steps.verify-changed-files.outputs.files_changed == 'true' runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 From 48983048f2866cb557a65d29423ad8f633967899 Mon Sep 17 00:00:00 2001 From: vuillaut Date: Thu, 10 Jun 2021 15:31:09 +0200 Subject: [PATCH 04/11] build pages only if there is a change in docs --- .github/workflows/gh_pages.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/gh_pages.yml b/.github/workflows/gh_pages.yml index 4fec8a2..62ddc37 100644 --- a/.github/workflows/gh_pages.yml +++ b/.github/workflows/gh_pages.yml @@ -6,7 +6,14 @@ on: - main # Set a branch to deploy jobs: + test_pages_change: + runs-on: ubuntu-latest + uses: tj-actions/verify-changed-files@v6.2 + with: + files: | + docs/* deploy: + if: steps.verify-changed-files.outputs.files_changed == 'true' runs-on: ubuntu-18.04 steps: - uses: actions/checkout@v2 @@ -26,8 +33,6 @@ jobs: echo "$PWD"; ls; - - - name: Deploy uses: peaceiris/actions-gh-pages@v3 with: From 33371655da6f7e0ae8cb42cfc2fcbc928dec9687 Mon Sep 17 00:00:00 2001 From: vuillaut Date: Thu, 10 Jun 2021 15:32:00 +0200 Subject: [PATCH 05/11] testing with a change in docs --- docs/content/posts/welcome.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/content/posts/welcome.md b/docs/content/posts/welcome.md index 34ec0ed..24f406b 100644 --- a/docs/content/posts/welcome.md +++ b/docs/content/posts/welcome.md @@ -98,10 +98,8 @@ https://indico.in2p3.fr/event/20306/contributions/95829/ - ## Recorded lecture - From 37ba9e570fe0e31cae3e5a49448c02afe870b470 Mon Sep 17 00:00:00 2001 From: vuillaut Date: Thu, 10 Jun 2021 15:33:01 +0200 Subject: [PATCH 06/11] test if changes in environment.yml --- environment.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/environment.yml b/environment.yml index bed3c38..743271a 100644 --- a/environment.yml +++ b/environment.yml @@ -30,3 +30,5 @@ dependencies: - wheel - pip: - build + + From 1019e9ad3bd49ccd8971c319add28622c26c1753 Mon Sep 17 00:00:00 2001 From: vuillaut Date: Thu, 10 Jun 2021 15:36:45 +0200 Subject: [PATCH 07/11] test if meaningful change in environment.yml --- environment.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/environment.yml b/environment.yml index 743271a..b1ad3cb 100644 --- a/environment.yml +++ b/environment.yml @@ -30,5 +30,6 @@ dependencies: - wheel - pip: - build + - ctaplot From b58b1e8c278753e1a3d3c5fac98d96826b052873 Mon Sep 17 00:00:00 2001 From: vuillaut Date: Thu, 10 Jun 2021 15:41:50 +0200 Subject: [PATCH 08/11] using correct action --- .github/workflows/python-package-conda.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml index d080e19..8f7a808 100644 --- a/.github/workflows/python-package-conda.yml +++ b/.github/workflows/python-package-conda.yml @@ -6,12 +6,14 @@ on: [push, pull_request] jobs: test_env_change: runs-on: ubuntu-latest - uses: tj-actions/verify-changed-files@v6.2 + uses: dorny/paths-filter@v2 + id: file-changes with: - files: | - environment.yml + filters: | + env: + - environment.yml build: - if: steps.verify-changed-files.outputs.files_changed == 'true' + if: steps.file-changes.outputs.env == 'true' runs-on: ${{ matrix.os }} strategy: max-parallel: 5 From f2dab7a3562e5a4ab340c16e6edf8be26ee153a1 Mon Sep 17 00:00:00 2001 From: vuillaut Date: Thu, 10 Jun 2021 15:46:42 +0200 Subject: [PATCH 09/11] more test --- .github/workflows/python-package-conda.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml index 8f7a808..7bd528c 100644 --- a/.github/workflows/python-package-conda.yml +++ b/.github/workflows/python-package-conda.yml @@ -6,14 +6,18 @@ on: [push, pull_request] jobs: test_env_change: runs-on: ubuntu-latest - uses: dorny/paths-filter@v2 - id: file-changes - with: - filters: | - env: - - environment.yml + outputs: + env: ${{ steps.filter.outputs.env }} + steps: + - uses: dorny/paths-filter@v2 + id: file-changes + with: + filters: | + env: + - environment.yml build: - if: steps.file-changes.outputs.env == 'true' + needs: test_env_changes + if: ${{ needs.test_env_changes.outputs.env == 'true' }} runs-on: ${{ matrix.os }} strategy: max-parallel: 5 From 70a8f135dbb39f5a393bd76d8b4d57c650faa6b3 Mon Sep 17 00:00:00 2001 From: vuillaut Date: Thu, 10 Jun 2021 15:54:07 +0200 Subject: [PATCH 10/11] more test --- .github/workflows/python-package-conda.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml index 7bd528c..178cf89 100644 --- a/.github/workflows/python-package-conda.yml +++ b/.github/workflows/python-package-conda.yml @@ -7,7 +7,7 @@ jobs: test_env_change: runs-on: ubuntu-latest outputs: - env: ${{ steps.filter.outputs.env }} + env: ${{ steps.file-changes.outputs.env }} steps: - uses: dorny/paths-filter@v2 id: file-changes From 2946eb55bdb30faf535c416f8017c70be2d65268 Mon Sep 17 00:00:00 2001 From: vuillaut Date: Thu, 10 Jun 2021 15:59:33 +0200 Subject: [PATCH 11/11] test change in env.yml --- environment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment.yml b/environment.yml index b1ad3cb..515ee14 100644 --- a/environment.yml +++ b/environment.yml @@ -30,6 +30,6 @@ dependencies: - wheel - pip: - build - - ctaplot + - pytest