Skip to content
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
41 changes: 30 additions & 11 deletions .github/workflows/test_full_stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,6 @@ on:
- warning
- debug
pull_request:
paths:
- 'roles/elasticstack/**'
- 'molecule/elasticstack_*/**'
- 'molecule/es_kibana/**'
- 'molecule/logstash_elasticsearch/**'
- 'molecule/cert_renewal/**'
- 'molecule/shared/**'
- 'plugins/**'
- '.github/workflows/test_full_stack.yml'
merge_group:
schedule:
- cron: "0 4 * * *"
Expand All @@ -34,15 +25,38 @@ concurrency:
cancel-in-progress: true

jobs:
changes:
runs-on: ubuntu-latest
outputs:
should_test: ${{ steps.filter.outputs.should_test }}
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: filter
with:
filters: |
should_test:
- 'roles/elasticstack/**'
- 'molecule/elasticstack_*/**'
- 'molecule/es_kibana/**'
- 'molecule/logstash_elasticsearch/**'
- 'molecule/cert_renewal/**'
- 'molecule/shared/**'
- 'plugins/**'
- '.github/workflows/test_full_stack.yml'

lint_full:
needs: changes
if: needs.changes.outputs.should_test == 'true' || github.event_name != 'pull_request'
uses: ./.github/workflows/test_linting.yml
with:
rolename: ''
secrets: inherit

molecule_full_stack_every_os:
runs-on: self-hosted
needs: lint_full
needs: [changes, lint_full]
if: needs.changes.outputs.should_test == 'true' || github.event_name != 'pull_request'
timeout-minutes: 120

env:
Expand Down Expand Up @@ -177,11 +191,16 @@ jobs:

full_stack_gate:
runs-on: ubuntu-latest
needs: [lint_full, molecule_full_stack_every_os]
needs: [changes, lint_full, molecule_full_stack_every_os]
if: always()
steps:
- name: Check results
run: |
# If no relevant files changed, tests were skipped — that's OK
if [[ "${{ needs.changes.outputs.should_test }}" != "true" && "${{ github.event_name }}" == "pull_request" ]]; then
echo "No relevant changes — skipping full stack gate"
exit 0
fi
if [[ "${{ needs.lint_full.result }}" != "success" ]] || \
[[ "${{ needs.molecule_full_stack_every_os.result }}" != "success" ]]; then
echo "Required jobs failed"
Expand Down
Loading