Coerce all datetime fields from ISO strings #2431
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: Analyze using pre-commit hooks | |
| on: | |
| push: | |
| branches: [altera, arm, main, sbp, tertia] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| env: | |
| UV_VERSION: '0.7.12' | |
| BIOME_VERSION: '2.3.8' | |
| jobs: | |
| # Skip the analysis if this commit already passed on another branch. | |
| dedup: | |
| uses: ./.github/workflows/dedup.yml | |
| permissions: | |
| actions: read | |
| with: | |
| workflow_file: analyze.yml | |
| analyze: | |
| needs: dedup | |
| # Manual dispatch always runs so we can force a re-analysis. | |
| if: needs.dedup.outputs.already_built != 'true' || github.event_name == 'workflow_dispatch' | |
| # Trusted sources on our own runner; fork PRs on the hosted runner. | |
| runs-on: ${{ (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && 'self-hosted' || 'ubuntu-latest' }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: | |
| - '3.13' | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 | |
| with: | |
| version: ${{ env.UV_VERSION }} | |
| - name: Install Biome | |
| uses: biomejs/setup-biome@4c91541eaada48f67d7dbd7833600ce162b68f51 # v2.7.1 | |
| with: | |
| version: ${{ env.BIOME_VERSION }} | |
| - name: Install dependencies | |
| run: uv sync --frozen --all-groups | |
| - name: Cache pre-commit data | |
| uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 | |
| with: | |
| path: ~/.cache/pre-commit | |
| key: pre-commit-3|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }} | |
| - name: Show pip version | |
| run: | | |
| pip --version | |
| python -m pip --version | |
| pip3 --version | |
| python3 -m pip --version | |
| uv run --frozen pip --version | |
| - name: Run pre-commit | |
| run: | | |
| uv run --frozen pre-commit run --show-diff-on-failure --color=always --all-files |