-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (42 loc) · 1.33 KB
/
Copy pathci.yml
File metadata and controls
51 lines (42 loc) · 1.33 KB
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
name: Cloud Notes Continuous Integration
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
jobs:
test:
runs-on: ubuntu-latest
env:
# CI uses isolated non-production values and never requires a committed .env file.
DOMAIN: localhost
POSTGRES_USER: ci_user
POSTGRES_PASSWORD: ci_password
POSTGRES_DB: cloud_notes_ci
JWT_SECRET_KEY: ci-only-secret-key-not-used-in-production
COOKIE_SECURE: "false"
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install Linting Tools
run: |
python -m pip install --upgrade pip
pip install flake8 -r backend/requirements.txt
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 backend/app backend/migrations backend/tests \
--count --select=E9,F63,F7,F82 --show-source --statistics
- name: Run backend tests
env:
PYTHONPATH: backend
run: python -m unittest discover -s backend/tests -v
- name: Validate Docker Compose
run: docker compose config --quiet
- name: Test Docker Builds
run: |
docker compose build server frontend