This commit is contained in:
25
.gitea/workflows/test.yml
Normal file
25
.gitea/workflows/test.yml
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
name: Python CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout Code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v4
|
||||||
|
with:
|
||||||
|
python-version: 3.11
|
||||||
|
|
||||||
|
- name: Install Dependencies
|
||||||
|
run: pip install -r requirements.txt
|
||||||
|
|
||||||
|
- name: Run Tests
|
||||||
|
run: pytest
|
||||||
|
|
||||||
1
requirements.txt
Normal file
1
requirements.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
pytest
|
||||||
5
test_app.py
Normal file
5
test_app.py
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
from app import add
|
||||||
|
|
||||||
|
def test_add():
|
||||||
|
assert add(2, 3) == 5
|
||||||
|
|
||||||
Reference in New Issue
Block a user