67594dc6a6
[Do] SDK-Dev self-review: workflow-only change, CI-only diff, no product impact
CI / test (3.11) (pull_request) Successful in 1m38s
CI / test (3.12) (pull_request) Successful in 1m33s
CI / test (3.13) (pull_request) Successful in 1m38s
sop-checklist / all-items-acked All SOP items acknowledged: CI workflow-only change, no breaking changes, test suite passes 308/1
CI / all-required (pull_request) Successful in 1s
Renames workflow name from "Test" → "CI" and adds an all-required sentinel job that aggregates the 3.11/3.12/3.13 matrix results into a single CI / all-required (pull_request) context. This enables a single required-status-check entry on the main branch protection (appending CI / all-required) instead of enumerating every matrix variant individually. Implements: molecule-ai/molecule-sdk-python#11 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
51 lines
1.3 KiB
YAML
51 lines
1.3 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
python-version: ['3.11', '3.12', '3.13']
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
- name: Install dependencies
|
|
run: pip install -e ".[test]"
|
|
|
|
- name: Run tests
|
|
run: python -m pytest tests/
|
|
|
|
- name: Lint
|
|
run: pip install ruff && ruff check molecule_agent/ molecule_plugin/
|
|
|
|
all-required:
|
|
name: all-required
|
|
needs: [test]
|
|
# required: all matrix variants must succeed
|
|
if: always()
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Verify all required jobs passed
|
|
run: |
|
|
# Collect results from all test matrix variants
|
|
results="${{ needs.test.result }}"
|
|
echo "Matrix results: $results"
|
|
# Any result that is not "success" is a failure condition
|
|
if [[ "$results" == *"failure"* ]] || \
|
|
[[ "$results" == *"cancelled"* ]] || \
|
|
[[ "$results" == *"skipped"* ]]; then
|
|
echo "One or more required jobs did not succeed: $results"
|
|
exit 1
|
|
fi
|
|
echo "All required jobs passed."
|