runner: stop loop on GOAL-REACHED when no verify step is configured; … #28
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: ci | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| concurrency: | |
| group: ci-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| # Default-deny: every job is read-only unless it declares more. | |
| permissions: | |
| contents: read | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| cache: pip | |
| - run: pip install -e ".[dev]" | |
| - run: ruff check . | |
| - run: mypy loopforge | |
| test: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| strategy: | |
| fail-fast: false | |
| 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 }} | |
| cache: pip | |
| - run: pip install -e ".[dev]" | |
| - run: python -m pytest -q | |
| self-lint: | |
| # Dogfood: loopforge lints its own example loop and must find it complete. | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - run: pip install -e . | |
| - run: loopforge lint examples/ci-green --fail-at major | |
| - run: loopforge lint examples/ci-green --score | |
| action-smoke: | |
| # Run the published composite action end-to-end (uses: ./) so the wrapper is proven on every | |
| # commit — install path, arg handling, and exit codes, not just static YAML. | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Action passes on a complete loop | |
| uses: ./ | |
| with: | |
| path: examples/ci-green | |
| fail-at: major | |
| - name: Action fails on a half-baked loop | |
| id: gate | |
| uses: ./ | |
| continue-on-error: true | |
| with: | |
| path: examples/half-baked | |
| fail-at: major | |
| - name: Assert the gate actually failed | |
| run: | | |
| if [ "${{ steps.gate.outcome }}" != "failure" ]; then | |
| echo "::error::action did not fail on the half-baked loop — fail-at gate is broken" | |
| exit 1 | |
| fi | |
| echo "fail-at gate works: the half-baked loop correctly failed the action." | |
| package: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| cache: pip | |
| - run: pip install build twine | |
| - run: python -m build --sdist --wheel | |
| - run: python -m twine check dist/* |