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>
45 lines
1.1 KiB
YAML
45 lines
1.1 KiB
YAML
name: CI
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches: [master]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
quality:
|
|
runs-on: docker
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Set up environment
|
|
run: make setup
|
|
- name: Lint all
|
|
run: |
|
|
. .venv/bin/activate
|
|
make lint-all
|
|
- name: Unit tests with 100% coverage
|
|
run: |
|
|
. .venv/bin/activate
|
|
make pytest-cov
|
|
- name: Check unit test speed
|
|
run: |
|
|
. .venv/bin/activate
|
|
python3 scripts/check_test_speed.py --max-seconds 10
|
|
|
|
molecule-tests:
|
|
needs: quality
|
|
runs-on: docker
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Set up environment
|
|
run: make setup
|
|
- 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
|
|
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
|