|
| 1 | +name: Check examples |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + push: |
| 6 | + branches: |
| 7 | + - 'release/**' |
| 8 | + |
| 9 | +concurrency: |
| 10 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 11 | + cancel-in-progress: true |
| 12 | + |
| 13 | +jobs: |
| 14 | + examples: |
| 15 | + name: Check examples job |
| 16 | + runs-on: ubuntu-latest |
| 17 | + timeout-minutes: 15 |
| 18 | + permissions: |
| 19 | + checks: write |
| 20 | + pull-requests: write |
| 21 | + contents: read |
| 22 | + |
| 23 | + services: |
| 24 | + postgres: |
| 25 | + image: pgvector/pgvector:${{ vars.PGVECTOR_IMAGE_TAG || '0.8.0-pg17' }} |
| 26 | + env: |
| 27 | + POSTGRES_USER: ragbits_example |
| 28 | + POSTGRES_PASSWORD: ragbits_example |
| 29 | + POSTGRES_DB: ragbits_example |
| 30 | + ports: |
| 31 | + - 5432:5432 |
| 32 | + options: >- |
| 33 | + --health-cmd "pg_isready -U postgres" |
| 34 | + --health-interval 10s |
| 35 | + --health-timeout 5s |
| 36 | + --health-retries 5 |
| 37 | +
|
| 38 | + weaviate: |
| 39 | + image: cr.weaviate.io/semitechnologies/weaviate:${{ vars.WEAVIATE_IMAGE_TAG || '1.30.6' }} |
| 40 | + env: |
| 41 | + QUERY_DEFAULTS_LIMIT: 25 |
| 42 | + AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED: true |
| 43 | + PERSISTENCE_DATA_PATH: /var/lib/weaviate |
| 44 | + ENABLE_API_BASED_MODULES: true |
| 45 | + CLUSTER_HOSTNAME: node1 |
| 46 | + ports: |
| 47 | + - 8080:8080 |
| 48 | + - 50051:50051 |
| 49 | + options: >- |
| 50 | + --health-cmd "wget --no-verbose --tries=1 --spider http://localhost:8080/v1/.well-known/ready || exit 1" |
| 51 | + --health-interval 10s |
| 52 | + --health-timeout 5s |
| 53 | + --health-retries 5 |
| 54 | +
|
| 55 | + grafana: |
| 56 | + image: grafana/otel-lgtm |
| 57 | + ports: |
| 58 | + - 3000:3000 |
| 59 | + - 4317:4317 |
| 60 | + - 4318:4318 |
| 61 | + |
| 62 | + steps: |
| 63 | + - uses: actions/checkout@v4 |
| 64 | + |
| 65 | + - name: Install uv |
| 66 | + uses: astral-sh/setup-uv@v2 |
| 67 | + with: |
| 68 | + version: ${{ vars.UV_VERSION || '0.6.9' }} |
| 69 | + |
| 70 | + - name: Run examples |
| 71 | + env: |
| 72 | + PR_BRANCH: ${{ github.head_ref }} |
| 73 | + GOOGLE_CLOUD_PROJECT: ${{ secrets.GCP_PROJECT_ID }} |
| 74 | + GCP_KEY: ${{ secrets.GCP_KEY }} |
| 75 | + GOOGLE_APPLICATION_CREDENTIALS: ${{ github.workspace }}/gcp_key.json |
| 76 | + OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} |
| 77 | + GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} |
| 78 | + ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} |
| 79 | + LOGFIRE_TOKEN: ${{ secrets.LOGFIRE_TOKEN }} |
| 80 | + run: | |
| 81 | + echo "$GCP_KEY" | base64 --decode > "$GOOGLE_APPLICATION_CREDENTIALS" |
| 82 | + ./.github/scripts/run_examples.sh |
0 commit comments