Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions pytest
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: CI Tests

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Install dependencies
run: |
pip install --upgrade pip
pip install -r requirements.txt

Add CI workflow and project structure





- name: Run tests
run: |
pytest -q
1 change: 1 addition & 0 deletions requirements.txt

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pytest
1 change: 1 addition & 0 deletions src/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
def add(a, b):\n return a + b
6 changes: 6 additions & 0 deletions tests/test_main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
tests/test_main.py
from src.main import add

def test_add():
assert add(2, 3) == 5
assert add(-1, 1) == 0