-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (56 loc) · 1.64 KB
/
Copy pathci.yml
File metadata and controls
59 lines (56 loc) · 1.64 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
name: CI
on:
push:
pull_request:
jobs:
python:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U postgres"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Compile Python sources
run: python -m compileall backend platform conftest.py
- name: Install test dependencies
run: pip install pytest psycopg[binary]
- name: Smoke import backend package
run: python -m backend.collaboration_dashboard --help
- name: Run unit tests
env:
TEST_MISSION_CONTROL_POSTGRES_ADMIN_URL: postgresql://postgres:postgres@127.0.0.1:5432/postgres
run: python -m pytest platform/tests/ -v --tb=short
frontend:
runs-on: ubuntu-latest
defaults:
run:
working-directory: apps/frontend
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20"
cache: npm
cache-dependency-path: apps/frontend/package-lock.json
- name: Install frontend dependencies
run: npm ci
- name: Build frontend
run: npm run build
- name: Install Playwright browser
run: npx playwright install --with-deps chromium
- name: Run E2E tests
run: npm run test:e2e