-
Notifications
You must be signed in to change notification settings - Fork 0
89 lines (84 loc) · 2.92 KB
/
Copy pathci.yml
File metadata and controls
89 lines (84 loc) · 2.92 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
name: CI
on:
push:
branches: ["main", "master"]
pull_request:
jobs:
django-core:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install app dependencies
run: |
python -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install -r requirements-prod.txt
- name: Django checks and smoke setup
env:
SECRET_KEY: ci-secret-key
DEBUG: 'True'
DATABASE_URL: sqlite:///db.sqlite3
run: |
source .venv/bin/activate
mkdir -p static media staticfiles
python manage.py makemigrations --check --dry-run
python manage.py migrate --noinput
python manage.py seed_demo || true
python manage.py seed_catalog || true
python manage.py seed_requirements || true
python manage.py seed_product_security || true
make team-test
nix-devshell:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v30
with:
extra_nix_config: |
experimental-features = nix-command flakes
- name: Nix dev shell smoke test
run: |
nix develop --command bash -lc '
python -m venv .venv-nix-ci
source .venv-nix-ci/bin/activate
python -m ensurepip --upgrade
python -m pip install --upgrade pip setuptools wheel
python -m pip install -r requirements.txt
cp .env.example .env
mkdir -p static media staticfiles
make team-test
'
rust-backend-tests:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: rustfmt, clippy
- name: Check Rust formatting
run: |
cargo fmt --manifest-path rust/iscy-backend/Cargo.toml -- --check
- name: Run Rust clippy
run: |
cargo clippy --manifest-path rust/iscy-backend/Cargo.toml --all-targets -- -D warnings
- name: Run Rust backend tests
run: |
cargo test --manifest-path rust/iscy-backend/Cargo.toml
docker-config:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Validate docker compose files
run: |
cp .env.example .env
docker compose -f docker-compose.yml config
docker compose -f docker-compose.yml -f docker-compose.llm.yml config
docker compose -f docker-compose.yml -f docker-compose.stage.yml config
docker compose -f docker-compose.yml -f docker-compose.prod.yml config
docker compose -f docker-compose.yml -f docker-compose.prod.yml -f docker-compose.llm.yml config