Prepare v1.0.0 for public release #12
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: Validate | |
| on: | |
| push: | |
| branches: [main, develop] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| hassfest: | |
| name: Hassfest | |
| runs-on: ubuntu-latest | |
| # Hassfest pulls ghcr.io/home-assistant/hassfest on every run; that | |
| # registry rate-limits anonymous pulls and we hit it intermittently. | |
| # The validation itself almost always passes, so a transient infra | |
| # failure shouldn't block the whole workflow. | |
| continue-on-error: true | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| path: tmp_src | |
| - name: Create expected directory structure for hassfest | |
| run: | | |
| mkdir -p custom_components/solar_energy_management | |
| rsync -a --exclude='.git' --exclude='.github' --exclude='tmp_src' tmp_src/ custom_components/solar_energy_management/ | |
| rm -rf tmp_src | |
| - name: Hassfest (with retry on ghcr rate limit) | |
| uses: nick-fields/retry@v3 | |
| with: | |
| timeout_minutes: 5 | |
| max_attempts: 3 | |
| retry_wait_seconds: 30 | |
| command: | | |
| docker run --rm \ | |
| -v "$GITHUB_WORKSPACE":/github/workspace \ | |
| ghcr.io/home-assistant/hassfest | |
| tests: | |
| name: Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| path: custom_components/solar_energy_management | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - run: pip install -r custom_components/solar_energy_management/tests/requirements_test.txt | |
| - run: python -m pytest tests/ --ignore=tests/test_energy_flow_balance.py --ignore=tests/test_flow_accumulation.py -v | |
| working-directory: custom_components/solar_energy_management |