Skip to content

Defillama

Defillama #434

Workflow file for this run

name: ci
on:
push:
branches: [main]
pull_request:
env:
PYTHON_VERSION: "3.13"
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: astral-sh/ruff-action@v4.0.0
- run: ruff format --check .
typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v8.1.0
with:
python-version: ${{ env.PYTHON_VERSION }}
- run: uv sync
- run: uv run basedpyright
- run: uv run lint-imports
test:
runs-on: ubuntu-latest
services:
qdrant:
image: qdrant/qdrant:v1.17.1
ports:
- 6333:6333
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v8.1.0
with:
python-version: ${{ env.PYTHON_VERSION }}
- uses: extractions/setup-just@v4
- name: Wait for Qdrant readiness
run: |
for i in {1..30}; do
if curl -sf http://localhost:6333/readyz > /dev/null; then
echo "Qdrant ready after ${i}s"
exit 0
fi
sleep 1
done
echo "Qdrant did not become ready in 30s"
curl -v http://localhost:6333/readyz || true
exit 1
- run: uv sync
- run: uv run pytest -n auto
coverage:
runs-on: ubuntu-latest
services:
qdrant:
image: qdrant/qdrant:v1.17.1
ports:
- 6333:6333
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v8.1.0
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Wait for Qdrant readiness
run: |
for i in {1..30}; do
if curl -sf http://localhost:6333/readyz > /dev/null; then
echo "Qdrant ready after ${i}s"
exit 0
fi
sleep 1
done
echo "Qdrant did not become ready in 30s"
curl -v http://localhost:6333/readyz || true
exit 1
- run: uv sync
- name: Generate coverage
run: uv run pytest -n auto --cov=slopmortem --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v6
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.xml
fail_ci_if_error: false
eval:
runs-on: ubuntu-latest
services:
qdrant:
image: qdrant/qdrant:v1.17.1
ports:
- 6333:6333
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v8.1.0
with:
python-version: ${{ env.PYTHON_VERSION }}
- uses: extractions/setup-just@v4
- name: Wait for Qdrant readiness
run: |
for i in {1..30}; do
if curl -sf http://localhost:6333/readyz > /dev/null; then
echo "Qdrant ready after ${i}s"
exit 0
fi
sleep 1
done
echo "Qdrant did not become ready in 30s"
curl -v http://localhost:6333/readyz || true
exit 1
- run: uv sync
- run: just eval
nix-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- run: nix build .#default --print-build-logs