Skip to content

Commit 0a511a8

Browse files
committed
automated tests
1 parent 764a8b3 commit 0a511a8

File tree

2 files changed

+38
-3
lines changed

2 files changed

+38
-3
lines changed

.github/workflows/test.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Python package
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-latest
9+
strategy:
10+
matrix:
11+
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
12+
13+
steps:
14+
- uses: actions/checkout@v3
15+
- name: Set up Python ${{ matrix.python-version }}
16+
uses: actions/setup-python@v4
17+
with:
18+
python-version: ${{ matrix.python-version }}
19+
- name: Install dependencies
20+
run: |
21+
python -m pip install --upgrade pip
22+
pip install -r requirements.txt
23+
- name: Test with pytest
24+
run: |
25+
pytest tests
26+
- name: Lint with pylint
27+
run: |
28+
pylint s_expression_parser setup.py tests
29+
- name: Check for sorted imports and black code style
30+
run: |
31+
isort s_expression_parser tests; black s_expression_parser tests; bash -c '[ $(git status --porcelain --untracked-files=no | wc -c) -eq 0 ] || (git status; git diff; exit 1)'
32+
- name: Check that the docs build
33+
run: |
34+
cd docs && make html

requirements.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11

2-
# ok-exam
3-
-e .
2+
.
43

54
# tests
6-
nose==1.3.7
5+
pytest
76
timeout-decorator==0.4.1
7+
black
8+
pylint

0 commit comments

Comments
 (0)