Skip to content

Commit 0499db0

Browse files
committed
feat: add ci/cd for testing
1 parent 2fea523 commit 0499db0

3 files changed

Lines changed: 2725 additions & 27 deletions

File tree

.github/workflows/ci.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: CI Pipeline
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
jobs:
10+
test:
11+
name: Run Tests
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Check out repository
16+
uses: actions/checkout@v4
17+
18+
- name: Install Poetry
19+
run: pipx install poetry
20+
21+
- name: Set up Python 3.13
22+
uses: actions/setup-python@v5
23+
with:
24+
python-version: "3.13"
25+
cache: "poetry"
26+
27+
- name: Install dependencies
28+
run: poetry install
29+
30+
- name: Run Pytest
31+
env:
32+
DEBUG: "True"
33+
HOST: "0.0.0.0"
34+
PORT: "8000"
35+
CELERY_RESULT_EXPIRES: "43200"
36+
37+
POSTGRES_USER: "ci_user"
38+
POSTGRES_PASSWORD: "ci_password"
39+
POSTGRES_HOST: "localhost"
40+
POSTGRES_PORT: "5432"
41+
POSTGRES_DB: "ci_db"
42+
43+
REDIS_HOST: "localhost"
44+
REDIS_PORT: "6379"
45+
REDIS_DB: "0"
46+
run: poetry run pytest -v

.gitignore

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -84,33 +84,6 @@ target/
8484
profile_default/
8585
ipython_config.py
8686

87-
# pyenv
88-
# For a library or package, you might want to ignore these files since the code is
89-
# intended to run in multiple environments; otherwise, check them in:
90-
.python-version
91-
92-
# pipenv
93-
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
94-
# However, in case of collaboration, if having platform-specific dependencies or dependencies
95-
# having no cross-platform support, pipenv may install dependencies that don't work, or not
96-
# install all needed dependencies.
97-
Pipfile.lock
98-
99-
# poetry
100-
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
101-
# This is especially recommended for binary packages to ensure reproducibility, and is more
102-
# commonly ignored for libraries.
103-
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
104-
poetry.lock
105-
106-
# pdm
107-
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
108-
#pdm.lock
109-
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
110-
# in version control.
111-
# https://pdm.fming.dev/#use-with-ide
112-
.pdm.toml
113-
11487
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
11588
__pypackages__/
11689

0 commit comments

Comments
 (0)