forked from bluesky/bluesky-httpserver
-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (35 loc) · 1.11 KB
/
Copy pathpre-commit.yml
File metadata and controls
46 lines (35 loc) · 1.11 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
44
45
46
name: pre-commit
on:
push:
pull_request:
workflow_dispatch:
jobs:
lint:
# pull requests are a duplicate of a branch push if within the same repo.
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
name: Check code style
runs-on: ubuntu-latest
env:
python_env: py313
strategy:
fail-fast: false
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v4
with:
# Need this to get version number from last tag
fetch-depth: 0
- uses: prefix-dev/setup-pixi@v0.10.0
- name: Install dev dependencies
run: |
set -vxeuo pipefail
set -vxeuo pipefail
pixi install --environment=${{ env.python_env }}
pixi list --environment=${{ env.python_env }}
pixi run --environment=${{ env.python_env }} pip list
pixi run --environment=${{ env.python_env }} conda list
- name: Run pre-commit
run: |
pixi run --environment=${{ env.python_env }} pre-commit run --all-files