Skip to content

Commit 9aa4d3c

Browse files
committed
add unit tests for simple_calculator
1 parent dbf67e5 commit 9aa4d3c

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

.github/workflows/run_test.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: simple_calculator unit test
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
python-version: ["3.10"]
11+
12+
steps:
13+
- uses: actions/checkout@v3
14+
- name: Set up Python ${{ matrix.python-version }}
15+
uses: actions/setup-python@v4
16+
with:
17+
python-version: ${{ matrix.python-version }}
18+
- name: Install dependencies
19+
run: |
20+
python -m pip install --upgrade pip
21+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
22+
- name: Lint with Ruff
23+
run: |
24+
pip install ruff
25+
ruff --format=github --target-version=py310 .
26+
continue-on-error: true
27+
- name: Test with pytest
28+
run: |
29+
coverage run -m pytest tests/tests_1b.py -v -s
30+
- name: Generate Coverage Report
31+
run: |
32+
coverage report -m

0 commit comments

Comments
 (0)