Skip to content

Commit 1db4d47

Browse files
committed
add github pipeline
1 parent dc99707 commit 1db4d47

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/ci.yaml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Python CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
jobs:
12+
build-and-test:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Check out the repository
17+
uses: actions/checkout@v3
18+
19+
- name: Set up Python 3.12
20+
uses: actions/setup-python@v4
21+
with:
22+
python-version: '3.12'
23+
24+
- name: Set up dependencies
25+
run: |
26+
cd prj/script
27+
./venv_create.sh
28+
cd ../..
29+
30+
- name: Install dependencies
31+
run: |
32+
python -m pip install --upgrade pip
33+
pip install pytest mypy pylint
34+
35+
- name: Run tests with pytest
36+
run: ./prj/script/venv/bin/pytest test/
37+
38+
- name: Run type checking with mypy
39+
run: ./prj/script/venv/bin/mypy --check-untyped-defs -p test -p src
40+
41+
- name: Run linter with pylint
42+
run: ./prj/script/venv/bin/python -m pylint src test

0 commit comments

Comments
 (0)