-
Notifications
You must be signed in to change notification settings - Fork 109
37 lines (32 loc) · 861 Bytes
/
pre-commit.yml
File metadata and controls
37 lines (32 loc) · 861 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
name: pre-commit
on:
pull_request:
push:
branches:
- mainline
- 'release_*'
permissions:
contents: read # to fetch code (actions/checkout)
defaults:
run:
shell: bash -l {0}
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
with:
miniforge-variant: Miniforge3
miniforge-version: latest
conda-remove-defaults: "true"
activate-environment: precommit
environment-file: ops/conda_env/pre-commit.yml
use-mamba: true
- name: Run pre-commit checks
run: |
pre-commit install
pre-commit run --all-files --color always