-
Notifications
You must be signed in to change notification settings - Fork 5
43 lines (41 loc) · 1.42 KB
/
pre-commit.yml
File metadata and controls
43 lines (41 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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