Skip to content

Commit e98c8d2

Browse files
committed
add ci run
1 parent af11f1f commit e98c8d2

File tree

1 file changed

+33
-1
lines changed

1 file changed

+33
-1
lines changed

.github/workflows/test.yml

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Tests
22

33
on:
44
push:
5-
branches: [main, develop, findhao/setup_ci]
5+
branches: [main, develop, findhao/setup_ci, findhao/add_linter]
66
pull_request:
77
branches: [main]
88
workflow_dispatch:
@@ -23,9 +23,41 @@ on:
2323
type: boolean
2424

2525
jobs:
26+
format-check:
27+
runs-on: ubuntu-latest
28+
timeout-minutes: 10
29+
steps:
30+
- uses: actions/checkout@v4
31+
32+
- name: Set up Python 3.11
33+
uses: actions/setup-python@v4
34+
with:
35+
python-version: "3.11"
36+
37+
- name: Cache pip dependencies
38+
uses: actions/cache@v3
39+
with:
40+
path: ~/.cache/pip
41+
key: ${{ runner.os }}-pip-format-${{ hashFiles('**/pyproject.toml') }}
42+
restore-keys: |
43+
${{ runner.os }}-pip-format-
44+
45+
- name: Install development dependencies
46+
run: |
47+
make install-dev
48+
49+
- name: Check code formatting
50+
run: |
51+
make format-check
52+
53+
- name: Check linting
54+
run: |
55+
make lint-check
56+
2657
test:
2758
runs-on: 4-core-ubuntu-gpu-t4
2859
timeout-minutes: 120
60+
needs: format-check
2961
steps:
3062
- uses: actions/checkout@v4
3163

0 commit comments

Comments
 (0)