forked from BasedHardware/omi
-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (56 loc) · 1.88 KB
/
Copy pathbackend-checks.yml
File metadata and controls
65 lines (56 loc) · 1.88 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
name: Backend Checks
on:
push:
branches: main
pull_request:
branches: main
concurrency:
group: backend-checks-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
changes:
name: Detect Changes
runs-on: ubuntu-latest
outputs:
diff_base: ${{ steps.changes.outputs.diff_base }}
has_backend_runtime_env: ${{ steps.changes.outputs.has_backend_runtime_env }}
steps:
- name: Checkout code
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Detect changed paths
id: changes
uses: ./.github/actions/detect-changes
static-contracts:
name: Static Contracts
runs-on: ubuntu-latest
needs: changes
if: needs.changes.outputs.has_backend_runtime_env == 'true'
steps:
- name: Checkout code
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version-file: backend/.python-version
- name: Set up uv
uses: astral-sh/setup-uv@ecd24dd710f2fb0dca1693a67af11fc4a5c5ec84
with:
# Exact version resolves locally; an unset version means "latest",
# which fetches the astral-sh/versions manifest and has hard-failed
# CI on that network call. Matches backend/Dockerfile UV_VERSION.
version: "0.11.13"
enable-cache: true
cache-dependency-glob: backend/pylock*.toml
- name: Install pinned backend dependencies
working-directory: backend
run: uv pip sync pylock.toml --system
- name: Check backend runtime env manifest
if: needs.changes.outputs.has_backend_runtime_env == 'true'
run: |
CLOUD_RUN_VPC_NETWORK=offline-check-network \
CLOUD_RUN_VPC_SUBNET=offline-check-subnet \
backend/scripts/pre-deploy-check.sh