Merge pull request #55 from bvweerd/claude/fix-02-calibration-gating #278
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: ["dev", "feature/**", "fix/**", "hotfix/**"] | |
| tags-ignore: ["**"] | |
| pull_request: | |
| branches: [dev, main] | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| lint: | |
| name: Lint & pre-commit | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.13" | |
| cache: pip | |
| - name: Install dependencies | |
| run: pip install pre-commit mypy -r requirements.txt | |
| - name: Cache pre-commit hooks | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.cache/pre-commit | |
| key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }} | |
| - name: Run pre-commit | |
| run: pre-commit run --all-files | |
| - name: Run mypy | |
| run: mypy custom_components/battery_controller/ | |
| test: | |
| name: Test (Python 3.13) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.13" | |
| cache: pip | |
| - name: Install dependencies | |
| run: pip install -r requirements.txt | |
| - name: Run pytest | |
| run: pytest --cov=custom_components --cov-report=xml -q | |
| - name: Upload coverage | |
| uses: codecov/codecov-action@v7 | |
| with: | |
| files: ./coverage.xml | |
| fail_ci_if_error: false | |
| hacs: | |
| name: HACS validation | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: hacs/action@main | |
| with: | |
| category: integration | |
| js-test: | |
| name: Test (JS analyzer) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: "20" | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run Jest | |
| run: npm test | |
| hassfest: | |
| name: Home Assistant hassfest | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: home-assistant/actions/hassfest@master |