Skip to content

Commit 149af85

Browse files
authored
Merge pull request #1152 from esc/gha/pre-commit
adding pre-commit workflow
2 parents ae3d178 + a7fbfa1 commit 149af85

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

Diff for: .github/workflows/pre-commit.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: lint with pre-commit
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
tags:
9+
- '*'
10+
11+
jobs:
12+
pre-commit:
13+
runs-on: ubuntu-latest
14+
defaults:
15+
run:
16+
shell: bash -el {0}
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
- name: Setup Miniconda
21+
uses: conda-incubator/setup-miniconda@v3
22+
with:
23+
auto-update-conda: true
24+
auto-activate-base: false
25+
- name: Install pre-commit
26+
run: conda install -c conda-forge pre-commit
27+
- name: Lint code with pre-commit
28+
run: pre-commit run --verbose --all-files

0 commit comments

Comments
 (0)