Skip to content

Commit 549fa7e

Browse files
Initial Commit
Has all the files for this lab set up.
0 parents  commit 549fa7e

File tree

6 files changed

+33
-0
lines changed

6 files changed

+33
-0
lines changed

.github/ci.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Python CI Pipeline
2+
on:
3+
push:
4+
branches: [ main ]
5+
pull_request:
6+
branches: [ main ]
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v3
15+
- name: Set up Python
16+
uses: actions/setup-python@v4
17+
with:
18+
python-version: '3.x'
19+
- name: Install dependencies
20+
run: |
21+
python -m pip install --upgrade pip
22+
pip install -r requirements.txt
23+
- name: Run tests
24+
run: |
25+
export PYTHONPATH=$PWD
26+
pytest --maxfail=5 --disable-warnings

__init__.py

Whitespace-only changes.

app.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
def add(a, b):
2+
return a + b

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pytest

tests/__init__.py

Whitespace-only changes.

tests/test_app.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
from app import add
2+
3+
def test_add():
4+
assert add(2, 3) == 5

0 commit comments

Comments
 (0)