Skip to content

Commit e9bf30c

Browse files
committed
ci: add GitHub Actions CI
1 parent bd18858 commit e9bf30c

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/ci.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main, master ]
6+
pull_request:
7+
branches: [ main, master ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ["3.10", "3.11", "3.12"]
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Set up Python ${{ matrix.python-version }}
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
24+
- name: Install dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install -r requirements.txt
28+
pip install pytest flake8
29+
30+
- name: Lint with flake8
31+
run: |
32+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
33+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
34+
35+
- name: Run tests
36+
run: pytest tests/ -v --tb=short

0 commit comments

Comments
 (0)