-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (28 loc) · 782 Bytes
/
ci.yml
File metadata and controls
35 lines (28 loc) · 782 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
name: Format and Lint
on:
pull_request:
branches:
- main
- master
jobs:
format-and-lint:
name: Format and Lint Check
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install pixi
uses: prefix-dev/setup-pixi@v0.9.0
with:
pixi-version: "latest"
cache: false # pixi is too large to cache (contains CUDA toolkit)
- name: Check formatting
run: |
pixi run format
if [ -n "$(git status --porcelain)" ]; then
echo "❌ Files were not properly formatted. Run 'pixi run format' to fix."
git diff
exit 1
fi
- name: Lint code
run: pixi run lint