ci: single molecule job running all pairs in parallel
Gitea Actions does not honor fail-fast/max-parallel for cancelling other matrix runners when one fails. Use a single molecule job that runs all (scenario, platform) pairs via run_molecule_parallel.py. This gives true parallel execution + immediate termination on the first failure, which is what we need to debug efficiently. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
parent
69b96e4785
commit
d65b2190e2
+4
-12
@@ -29,24 +29,16 @@ jobs:
|
||||
molecule-tests:
|
||||
needs: quality
|
||||
runs-on: docker
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
runner-index: [0, 1, 2]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up environment
|
||||
run: make setup
|
||||
- name: Discover assigned test pairs
|
||||
run: |
|
||||
. .venv/bin/activate
|
||||
PAIRS=$(python3 scripts/distribute_molecule.py --runner-index ${{ matrix.runner-index }} --max-runners 3)
|
||||
echo "Assigned pairs: $PAIRS"
|
||||
echo "TEST_PAIRS=$PAIRS" >> $GITHUB_ENV
|
||||
- name: Run molecule tests
|
||||
- name: Run all molecule tests in parallel
|
||||
run: |
|
||||
set -euo pipefail
|
||||
. .venv/bin/activate
|
||||
export DOCKER_HOST="unix:///run/user/$(id -u)/docker.sock"
|
||||
export ANSIBLE_INJECT_INVOCATION=1
|
||||
python3 scripts/run_molecule_parallel.py $TEST_PAIRS
|
||||
PAIRS=$(python3 scripts/distribute_molecule.py --runner-index 0 --max-runners 1)
|
||||
echo "Running all pairs in parallel: $PAIRS"
|
||||
python3 scripts/run_molecule_parallel.py $PAIRS
|
||||
|
||||
Reference in New Issue
Block a user