-
Notifications
You must be signed in to change notification settings - Fork 4
40 lines (38 loc) · 1016 Bytes
/
pre-commit.yml
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
name: Run pre-commit in blueprint
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
blueprint-pre-commit:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.11.0
- uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: "latest"
channels: conda-forge
channel-priority: flexible
show-channel-urls: true
- name: Create env from unpinned reqs
run: |
conda env create --name dev_env --file requirements/requirements.yml
- name: Install project into env
run: |
conda run --name dev_env pip install --no-deps .
- name: Install pre-commit hooks
run: |
conda run --name dev_env pre-commit install-hooks
- name: Run pre-commit hooks
run: |
conda run --name dev_env pre-commit run --all-files