-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (60 loc) · 1.7 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: CI Pipeline
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: solo6755
POSTGRES_DB: postgres
ports:
- 5433:5432 # Expose PostgreSQL on the port you're using
options: >-
--health-cmd "pg_isready -U postgres"
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
DATABASE_URL: postgres://postgres:solo6755@postgres:5432/postgres
SECRET_KEY: ${{ secrets.SECRET_KEY }}
FERNET_KEY: ${{ secrets.FERNET_KEY }}
FORCE_JAVASCRIPT_ACTIONS_TO_NODE20: 'true'
steps:
# Checkout the code from the repository
- name: Checkout code
uses: actions/checkout@v4
# Set up Python environment
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
# Install docker-compose
- name: Install docker-compose
run: |
python -m venv venv
sudo apt-get update
sudo apt-get install -y docker-compose
# Install dependencies
- name: Install dependencies
run: |
source venv/bin/activate
pip install -r requirements.txt
# Install Flake8
- name: Install Flake8
run: |
python -m venv venv
source venv/bin/activate
pip install flake8
- name: Lint with Flake8
run: |
source venv/bin/activate
flake8 . --exclude=venv --count --select=E9,F63,F7,F82 --show-source --statistics