fix: normalize range validation for light, cover, and valve domains #152
Workflow file for this run
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] | |
| tags: ["v*"] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| # ── Detect project layout ────────────────────────────────────────── | |
| detect-stack: | |
| name: Detect stack | |
| runs-on: ubuntu-latest | |
| outputs: | |
| has-python: ${{ steps.detect.outputs.has-python }} | |
| has-docker: ${{ steps.detect.outputs.has-docker }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Detect components | |
| id: detect | |
| run: | | |
| has_python=false | |
| has_docker=false | |
| if [ -f pyproject.toml ] || [ -f setup.py ] || [ -f requirements.txt ]; then | |
| has_python=true | |
| fi | |
| if [ -f Dockerfile ]; then | |
| has_docker=true | |
| fi | |
| echo "has-python=${has_python}" >> "$GITHUB_OUTPUT" | |
| echo "has-docker=${has_docker}" >> "$GITHUB_OUTPUT" | |
| # ── Python ──────────────────────────────────────────────────────── | |
| py-lint: | |
| name: Python Lint | |
| if: needs.detect-stack.outputs.has-python == 'true' | |
| needs: [detect-stack] | |
| uses: ./.github/workflows/python-lint.yml | |
| with: | |
| python-version: ${{ vars.CI_PYTHON_VERSION || '3.11' }} | |
| install-spec: ${{ vars.CI_PYTHON_INSTALL_SPEC || '.[dev]' }} | |
| py-build: | |
| name: Python Build | |
| if: needs.detect-stack.outputs.has-python == 'true' | |
| needs: [detect-stack] | |
| uses: ./.github/workflows/python-ci.yml | |
| with: | |
| python-version: ${{ vars.CI_PYTHON_VERSION || '3.11' }} | |
| install-spec: ${{ vars.CI_PYTHON_INSTALL_SPEC || '.[dev]' }} | |
| py-typecheck: | |
| name: Python Type Check | |
| if: needs.detect-stack.outputs.has-python == 'true' | |
| needs: [detect-stack] | |
| uses: ./.github/workflows/python-typecheck.yml | |
| with: | |
| python-version: ${{ vars.CI_PYTHON_VERSION || '3.11' }} | |
| install-spec: ${{ vars.CI_PYTHON_INSTALL_SPEC || '.[dev]' }} | |
| py-test: | |
| name: Python Test | |
| if: needs.detect-stack.outputs.has-python == 'true' | |
| needs: [detect-stack] | |
| uses: ./.github/workflows/python-tests.yml | |
| with: | |
| python-versions: ${{ vars.CI_PYTHON_TEST_VERSIONS || '["3.11","3.12","3.13"]' }} | |
| install-spec: ${{ vars.CI_PYTHON_INSTALL_SPEC || '.[dev]' }} | |
| coverage-target: ${{ vars.CI_PYTHON_COVERAGE_TARGET || 'haclient' }} | |
| coverage-threshold: ${{ fromJSON(vars.CI_PYTHON_COVERAGE_THRESHOLD || '95') }} | |
| # ── Security ────────────────────────────────────────────────────── | |
| secrets-scan: | |
| name: Secrets | |
| needs: [detect-stack] | |
| uses: ./.github/workflows/python-gitleaks.yml | |
| secrets: | |
| GITLEAKS_LICENSE: ${{ secrets.GITLEAKS_LICENSE }} | |
| # ── Quality gate ────────────────────────────────────────────────── | |
| quality-gate: | |
| name: Quality gate | |
| if: always() | |
| needs: [detect-stack, py-lint, py-build, py-typecheck, py-test, secrets-scan] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check required job results | |
| env: | |
| PY_LINT: ${{ needs.py-lint.result }} | |
| PY_BUILD: ${{ needs.py-build.result }} | |
| PY_TYPECHECK: ${{ needs.py-typecheck.result }} | |
| PY_TEST: ${{ needs.py-test.result }} | |
| SECRETS_SCAN: ${{ needs.secrets-scan.result }} | |
| run: | | |
| results=("$PY_LINT" "$PY_BUILD" "$PY_TYPECHECK" "$PY_TEST" "$SECRETS_SCAN") | |
| for result in "${results[@]}"; do | |
| if [ "$result" = "failure" ] || [ "$result" = "cancelled" ]; then | |
| exit 1 | |
| fi | |
| done | |
| # ── Release ─────────────────────────────────────────────────────── | |
| release: | |
| name: Release | |
| if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | |
| needs: [detect-stack, quality-gate] | |
| uses: ./.github/workflows/python-release.yml | |
| permissions: | |
| contents: write |