Repository navigation
51 lines (47 loc) · 1.61 KB
/
Copy pathci.yml
File metadata and controls
51 lines (47 loc) · 1.61 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: CI
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
jobs:
checks:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v6
with:
python-version: ${{ matrix.python-version }}
- run: uv sync --locked
- run: uv run ruff check .
- run: uv run ruff format --check .
- run: uv run mypy
- run: uv run python scripts/generate.py --check
- run: uv run pytest
e2e:
# Against the checksum-verified server release the SDK is pinned to.
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v6
with:
python-version: "3.12"
- run: uv sync --locked
- name: Install omnigraph-server
run: |
version=$(uv run python -c "import tomllib;print(tomllib.load(open('pyproject.toml','rb'))['tool']['omnigraph']['server-version'])")
base="https://github.com/ModernRelay/omnigraph/releases/download/v${version}"
mkdir -p "$RUNNER_TEMP/og" && cd "$RUNNER_TEMP/og"
curl -sSfL -o og.tar.gz "$base/omnigraph-linux-x86_64.tar.gz"
curl -sSfL -o og.sha256 "$base/omnigraph-linux-x86_64.sha256"
sed -i 's/omnigraph-linux-x86_64.tar.gz/og.tar.gz/' og.sha256
sha256sum -c og.sha256
tar xzf og.tar.gz omnigraph omnigraph-server
echo "OMNIGRAPH_BIN_DIR=$RUNNER_TEMP/og" >> "$GITHUB_ENV"
- run: uv run pytest tests/test_e2e.py
env:
OMNIGRAPH_TEST_SERVER: "1"