Skip to content

Initial commit - Ambient Code Reference Repository #1

Initial commit - Ambient Code Reference Repository

Initial commit - Ambient Code Reference Repository #1

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
lint-and-test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Install dependencies
run: |
uv pip install --system -r requirements-dev.txt
- name: Run black
run: black --check app/ tests/
- name: Run isort
run: isort --check-only app/ tests/
- name: Run ruff
run: ruff check app/ tests/
- name: Run tests with coverage
run: pytest --cov=app --cov-report=xml --cov-report=term-missing
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
files: ./coverage.xml
flags: unittests
name: codecov-${{ matrix.python-version }}
build-container:
runs-on: ubuntu-latest
needs: lint-and-test
steps:
- uses: actions/checkout@v4
- name: Build container
run: |
podman build -t ambient-code-reference:test -f Containerfile .
- name: Test container health
run: |
podman run -d --name test-app -p 8000:8000 ambient-code-reference:test
sleep 5
curl --fail http://localhost:8000/health || exit 1
podman stop test-app
podman rm test-app