add ci
All checks were successful
Python CI / test (push) Successful in 1m16s

This commit is contained in:
2025-12-05 21:05:37 +07:00
parent 21cc7d1b2a
commit ee500ebccd
4 changed files with 33 additions and 0 deletions

25
.gitea/workflows/test.yml Normal file
View 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

2
app.py Normal file
View File

@@ -0,0 +1,2 @@
def add(a, b):
return a + b

1
requirements.txt Normal file
View File

@@ -0,0 +1 @@
pytest

5
test_app.py Normal file
View File

@@ -0,0 +1,5 @@
from app import add
def test_add():
assert add(2, 3) == 5