Topics cli #935
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: pre-commit | |
| on: | |
| pull_request: | |
| push: | |
| jobs: | |
| pre-commit: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| env: | |
| CARGO_NET_GIT_FETCH_WITH_CLI: true | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 | |
| - name: Configure git auth for private dependencies | |
| run: | | |
| token="${BT_GITHUB_TOKEN:-$GITHUB_TOKEN}" | |
| git config --global url."https://x-access-token:${token}@github.com/".insteadOf "https://github.com/" | |
| env: | |
| BT_GITHUB_TOKEN: ${{ secrets.BT_GITHUB_TOKEN }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@efa25f7f19611383d5b0ccf2d1c8914531636bf9 # master | |
| with: | |
| toolchain: 1.92.0 | |
| components: rustfmt, clippy | |
| - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | |
| with: | |
| node-version: "20" | |
| - name: Enable pnpm | |
| run: | | |
| corepack enable | |
| corepack prepare pnpm@10.28.2 --activate | |
| - name: Install JS dependencies | |
| run: pnpm install --ignore-scripts | |
| - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 | |
| with: | |
| python-version: "3.11" | |
| - name: Install pre-commit | |
| run: python -m pip install pre-commit | |
| - name: Run pre-commit | |
| run: pre-commit run --all-files --show-diff-on-failure |