feat: add backend CI/CD deployment

This commit is contained in:
hailt 2026-11-12 21:32:31 +07:00
parent 8d40cff227
commit 7c2e6ed571
21 changed files with 269 additions and 41 deletions

35
.github/workflows/ci.yml vendored Normal file
View file

@ -0,0 +1,35 @@
name: Backend CI
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Test and build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
cache-dependency-path: requirements.txt
- name: Install dependencies
run: python -m pip install -r requirements.txt
- name: Test
run: python -m pytest tests/ -q
- name: Build image
run: docker build -t danagble-be:ci .