From e75e9c0f8016fed92d92ff5d9f05c613e6cb324c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Peliz=C3=A4us?= Date: Fri, 8 Nov 2024 13:22:37 +0100 Subject: [PATCH 1/2] github: Use same naming for docs tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julian Pelizäus --- .github/workflows/tests.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c935dd4d..68dd2fe7 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -398,7 +398,8 @@ jobs: calc: ALL tmpdir: /tmp/tics - documentation-checks: + doc-tests: + name: Documentation uses: canonical/documentation-workflows/.github/workflows/documentation-checks.yaml@main with: working-directory: './doc' @@ -407,7 +408,7 @@ jobs: snap: name: Trigger snap edge build runs-on: ubuntu-22.04 - needs: [code-tests, system-tests, documentation-checks] + needs: [code-tests, system-tests, doc-tests] if: ${{ github.repository == 'canonical/microcloud' && github.event_name == 'push' && github.actor != 'dependabot[bot]' }} steps: - name: Checkout code From f2f5e03eb2138196aa2ef3896d953b15e01d74a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Peliz=C3=A4us?= Date: Fri, 8 Nov 2024 13:36:23 +0100 Subject: [PATCH 2/2] github: Don't run system tests for doc only changes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julian Pelizäus --- .github/workflows/tests.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 68dd2fe7..81050a44 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -25,9 +25,27 @@ defaults: shell: bash jobs: + changes: + name: Changes + runs-on: ubuntu-22.04 + outputs: + except_docs: ${{ steps.filter.outputs.except_docs }} + steps: + - name: Check for changes + uses: dorny/paths-filter@v3 + id: filter + with: + filters: | + except_docs: + # Match all changes except 'doc/**'. + # If no files outside of 'doc/**' are changed except_docs is set to 'false'. + - '!(doc/**)' + code-tests: name: Code runs-on: ubuntu-22.04 + needs: [changes] + if: ${{ needs.changes.outputs.except_docs == 'true' }} steps: - name: Checkout uses: actions/checkout@v4