-
-
Notifications
You must be signed in to change notification settings - Fork 13
62 lines (54 loc) · 1.46 KB
/
ci.yaml
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
uses: ./.github/workflows/build.yaml
ruff-lint:
runs-on: 'ubuntu-20.04'
steps:
- name: checkout
uses: actions/checkout@v4
- name: setup rye
uses: eifinger/setup-rye@v3
- name: install dependencies
run: rye sync
- name: lint
run: rye run ruff check src/
- name: auto fix
if: ${{ failure() }}
run: rye run ruff check --fix src/
- name: suggest changes
if: ${{ failure() }}
uses: parkerbxyz/[email protected]
ruff-format:
runs-on: 'ubuntu-20.04'
steps:
- name: checkout
uses: actions/checkout@v4
- name: setup rye
uses: eifinger/setup-rye@v3
- name: install dependencies
run: rye sync
- name: format
run: rye run ruff format --check src/
- name: auto fix
if: ${{ failure() }}
run: rye run ruff format src/
- name: suggest changes
if: ${{ failure() }}
uses: parkerbxyz/[email protected]
mypy:
runs-on: 'ubuntu-20.04'
steps:
- name: checkout
uses: actions/checkout@v4
- name: setup rye
uses: eifinger/setup-rye@v3
- name: install dependencies
run: rye sync
- name: type check
run: rye run mypy --disable-error-code "import" src/