Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

github: Run code/system tests for non doc changes only #471

Merged
merged 2 commits into from
Nov 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 21 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -398,7 +416,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'
Expand All @@ -407,7 +426,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
Expand Down
Loading