Skip to content

Commit 4b3f22c

Browse files
committed
Add CI workflow for tests and linting
1 parent 3a60b0e commit 4b3f22c

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
lint:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- name: Set up Python
13+
uses: actions/setup-python@v4
14+
with:
15+
python-version: '3.10'
16+
cache: 'pip'
17+
cache-dependency-path: 'pyproject.toml'
18+
- name: Install dependencies
19+
run: |
20+
pip install . flake8 black mypy
21+
- name: flake8
22+
run: flake8 .
23+
- name: black
24+
run: black --check .
25+
- name: mypy
26+
run: mypy .
27+
28+
test:
29+
runs-on: ubuntu-latest
30+
steps:
31+
- uses: actions/checkout@v4
32+
- name: Set up Python
33+
uses: actions/setup-python@v4
34+
with:
35+
python-version: '3.10'
36+
cache: 'pip'
37+
cache-dependency-path: 'pyproject.toml'
38+
- name: Install dependencies
39+
run: |
40+
pip install . pytest
41+
- name: pytest
42+
run: pytest

0 commit comments

Comments
 (0)