forked from dashpay/rust-dashcore
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (37 loc) · 1009 Bytes
/
pre-commit.yml
File metadata and controls
44 lines (37 loc) · 1009 Bytes
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
44
name: Pre-commit Checks
on:
push:
branches:
- master
- 'v**-dev'
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
pre-commit:
name: Pre-commit (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Cache cargo dependencies
uses: Swatinem/rust-cache@v2
with:
shared-key: "pre-commit-rust-${{ matrix.os }}"
- name: Run pre-commit
uses: pre-commit/action@v3.0.1
with:
extra_args: --all-files --hook-stage push --verbose