Skip to content

CI

CI #6

Workflow file for this run

name: "CI"
on:
push:
paths:
- 'Dockerfile'
- 'config.yaml'
- 'requirements.txt'
pull_request:
branches: [ "master" ]
workflow_dispatch:
jobs:
docker:
name: Build Docker images
runs-on: ubuntu-latest
steps:
- name: Checkout πŸ›ŽοΈ
uses: actions/checkout@v4
# https://github.com/marketplace/actions/docker-setup-buildx
- name: Set up Docker Buildx πŸ”§
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container registry 🏭
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
# https://github.com/marketplace/actions/build-and-push-docker-images
- name: Build and push CLI image πŸ§ͺ
id: docker_build
uses: docker/build-push-action@v5
with:
push: true
tags: ghcr.io/cyclenerd/google-cloud-litellm-proxy:test
docker-test:
name: Test Docker image
needs: [docker]
runs-on: ubuntu-latest
services:
litellm:
image: ghcr.io/cyclenerd/google-cloud-litellm-proxy:test
env:
LITELLM_LOG: "INFO"
ports:
- 8080:8080
steps:
- name: Test API
run: |
curl --fail-with-body -X 'GET' 'http://localhost:8080/models' -H 'accept: application/json'