-
Notifications
You must be signed in to change notification settings - Fork 134
56 lines (45 loc) · 1.15 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: CI
on:
push:
branches: [main, staging, dev]
pull_request:
branches: [main, staging, dev]
jobs:
build-and-test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:latest
env:
POSTGRES_USER:
POSTGRES_PASSWORD:
POSTGRES_DB:
ports:
- 5432:5432
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.9"
virtual-environment: venv
- name: Install dependencies
run: |
pip install -r requirements.txt
# - name: Copy env file
# run: cp .env.sample .env
# - name: Copy env file for main
# if: github.ref == 'refs/heads/main'
# run: cp .env.production .env
# - name: Copy env file for staging
# if: github.ref == 'refs/heads/staging'
# run: cp .env.staging .env
# - name: Run migrations
# run: |
# activate
# alembic upgrade head
# - name: Run tests
# run: |
# activate
# pytest