Skip to content

Bump astral-sh/setup-uv from 6 to 7 in /.github/workflows #366

Bump astral-sh/setup-uv from 6 to 7 in /.github/workflows

Bump astral-sh/setup-uv from 6 to 7 in /.github/workflows #366

Workflow file for this run

name: CI
# Configure GHA to run this workflow whenever either:
# (a) a pull request is opened or updated, or
# (b) a commit(s) is pushed into the `main` branch.
on:
pull_request: { }
push: { branches: [ main ] }
jobs:
pr-check:
name: PR checks
runs-on: ubuntu-latest
# Define environment variables that will be available to all steps within this job.
env:
MONGO_HOST: mongo
MONGO_PORT: 27017
MONGO_USERNAME: admin
MONGO_PASSWORD: root
MONGO_DATABASE: bertron
steps:
- uses: actions/checkout@v5
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
# Note: We added this `version: "latest"` to work around the following bug in this GHA:
# https://github.com/astral-sh/setup-uv/issues/489
version: "latest"
- name: Install the project
run: uv sync --all-extras --dev
- name: Check formatting
run: uv run ruff format --check -- src/
- name: Lint
run: uv run ruff check -- src/
# Note: This spins up containers running the default services.
# This does not include the `ingest` or `test` services,
# which aren't part of the default profile.
- name: Spin up Docker Compose stack in background
run: docker compose up --detach
# Note: The `--exit-code-from test` option applies the exit code of the `ingest` container
# to the `docker compose` process, so that the GHA step fails if ingest fails.
# Reference: https://docs.docker.com/reference/cli/docker/compose/up/
- name: Spin up `test` container
run: docker compose up --exit-code-from test test
# Note: This spins everything down.
- name: Spin down Docker Compose stack
run: docker compose down