feat: add backend CI/CD deployment
This commit is contained in:
parent
8d40cff227
commit
7c2e6ed571
21 changed files with 269 additions and 41 deletions
35
.github/workflows/ci.yml
vendored
Normal file
35
.github/workflows/ci.yml
vendored
Normal 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 .
|
||||
Loading…
Add table
Add a link
Reference in a new issue