-
Notifications
You must be signed in to change notification settings - Fork 1
108 lines (88 loc) · 2.48 KB
/
ci.yml
File metadata and controls
108 lines (88 loc) · 2.48 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
name: MeetlyAI CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
backend-lint:
name: Backend Linting
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./backend
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
cache-dependency-path: './backend/requirements.txt'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install flake8
- name: Lint with flake8
run: |
# Stop build on syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# Treat all other errors as warnings
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
backend-docker:
name: Backend Docker Build
runs-on: ubuntu-latest
needs: backend-lint
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Docker image
uses: docker/build-push-action@v5
with:
context: ./backend
file: ./backend/Dockerfile
push: false
tags: meetlyai-backend:test
cache-from: type=gha
cache-to: type=gha,mode=max
frontend-lint:
name: Frontend Linting
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./frontend
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
cache-dependency-path: './frontend/package-lock.json'
- name: Install dependencies
run: npm ci
- name: Lint
run: npm run lint
frontend-docker:
name: Frontend Docker Build
runs-on: ubuntu-latest
needs: frontend-lint
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Docker image
uses: docker/build-push-action@v5
with:
context: ./frontend
file: ./frontend/Dockerfile
push: false
tags: meetlyai-frontend:test
cache-from: type=gha
cache-to: type=gha,mode=max