chore(deps): update pre-commit hook igorshubovych/markdownlint-cli to v0.47.0 #1773
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
| # This workflow will install Python dependencies, run tests and lint with a variety of Python versions | |
| # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
| name: Test against HA-core | |
| env: | |
| CACHE_VERSION: 1 | |
| DEFAULT_PYTHON: "3.13" | |
| PRE_COMMIT_HOME: ~/.cache/pre-commit | |
| VENV: venv | |
| # Do not run on 'push' (as the flow doesn't have access to the labels) - also disabled workflow_dispatch as such | |
| # Workaround could be something like | |
| # - name: Get PR labels | |
| # run: | | |
| # PR_LABELS=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | |
| # "https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/labels") | |
| # echo "PR Labels: $PR_LABELS" | |
| on: | |
| pull_request: | |
| types: | |
| - opened | |
| - synchronize | |
| - labeled | |
| - unlabeled | |
| jobs: | |
| # Determine cache key once | |
| cache: | |
| runs-on: ubuntu-latest | |
| name: Cache identify | |
| outputs: | |
| cache-key: ${{ steps.set-key.outputs.cache-key }} | |
| python-version: ${{ steps.python.outputs.python-version }} | |
| steps: | |
| - name: Check out committed code | |
| uses: actions/checkout@v6 | |
| - name: Set up Python ${{ env.DEFAULT_PYTHON }} | |
| id: python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ env.DEFAULT_PYTHON }} | |
| - name: Fetch HA pyproject | |
| id: core-version | |
| run: wget -O ha_pyproject.toml "https://raw.githubusercontent.com/home-assistant/core/refs/heads/dev/pyproject.toml" | |
| - name: Compute cache key | |
| id: set-key | |
| run: echo "cache-key=${{ runner.os }}--${{ env.CACHE_VERSION }}-${{ hashFiles('pyproject.toml', 'requirements_test.txt', '.pre-commit-config.yaml', 'ha_pyproject.toml') }}" >> "$GITHUB_OUTPUT" | |
| # Prepare default python version environment | |
| prepare: | |
| runs-on: ubuntu-latest | |
| needs: cache | |
| name: Prepare | |
| steps: | |
| - name: Prepare code checkout and python/pre-commit setup | |
| id: cache-reuse | |
| uses: plugwise/gh-actions/prepare-python-and-code@v1 | |
| with: | |
| cache-key: ${{ needs.cache.outputs.cache-key }} | |
| fail-on-miss: false # First time create cache (if not already exists) | |
| python-version: ${{ needs.cache.outputs.python-version }} | |
| venv-dir: ${{ env.VENV }} | |
| precommit-home: ${{ env.PRE_COMMIT_HOME }} | |
| clone-core: "true" | |
| # Prepare default python version environment | |
| ha-core-release: | |
| runs-on: ubuntu-latest | |
| name: Setup for HA-core (release/master) | |
| needs: | |
| - cache | |
| - prepare | |
| steps: | |
| - name: Check out committed code | |
| uses: actions/checkout@v6 | |
| - name: Restore cached environment | |
| id: cache-reuse | |
| uses: plugwise/gh-actions/restore-venv@v1 | |
| with: | |
| cache-key: ${{ needs.cache.outputs.cache-key }} | |
| python-version: ${{ needs.cache.outputs.python-version }} | |
| venv-dir: ${{ env.VENV }} | |
| precommit-home: ${{ env.PRE_COMMIT_HOME }} | |
| - name: Test through HA-core (master/release) | |
| id: ha_core_release_tests | |
| run: | | |
| set +e | |
| source venv-${{ needs.cache.outputs.python-version }}/bin/activate | |
| GITHUB_ACTIONS="" scripts/ci-core-testing.sh | |
| EXIT_CODE=$? | |
| exit $EXIT_CODE | |
| shellcheck: | |
| name: Shellcheck | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/[email protected] | |
| - name: Run ShellCheck | |
| uses: ludeeus/action-shellcheck@master |