Skip to content

Merge branch 'main' into update-g4f-to-0.3.1.8 #265

Merge branch 'main' into update-g4f-to-0.3.1.8

Merge branch 'main' into update-g4f-to-0.3.1.8 #265

name: Dev - Build and Test
on:
push:
branches-ignore:
- main
workflow_dispatch:
jobs:
build-agixt:
runs-on: ubuntu-latest
outputs:
github_user: ${{ steps.extract_info.outputs.github_user }}
repo_name: ${{ steps.extract_info.outputs.repo_name }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Extract GitHub info and ensure lowercase
id: extract_info
run: |
echo "github_user=$(echo ${{ github.actor }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_OUTPUT
echo "repo_name=$(echo ${{ github.repository }} | cut -d'/' -f 2 | tr '[:upper:]' '[:lower:]')" >> $GITHUB_OUTPUT
- 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.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
tags: |
ghcr.io/${{ steps.extract_info.outputs.github_user }}/${{ steps.extract_info.outputs.repo_name }}:dev
ghcr.io/${{ steps.extract_info.outputs.github_user }}/${{ steps.extract_info.outputs.repo_name }}:${{ github.sha }}
test-agixt:
uses: josh-xt/AGiXT/.github/workflows/operation-test-with-jupyter.yml@main
with:
notebook: tests/tests.ipynb
image: ghcr.io/${{ needs.build-agixt.outputs.github_user }}/${{ needs.build-agixt.outputs.repo_name }}:${{ github.sha }}
port: "7437"
db-connected: false
report-name: "agixt-tests"
additional-python-dependencies: agixtsdk
needs: build-agixt
test-agixt-db:
uses: josh-xt/AGiXT/.github/workflows/operation-test-with-jupyter.yml@main
with:
notebook: tests/tests.ipynb
image: ghcr.io/${{ needs.build-agixt.outputs.github_user }}/${{ needs.build-agixt.outputs.repo_name }}:${{ github.sha }}
port: "7437"
db-connected: true
database-type: "postgresql"
report-name: "agixt-db-tests"
additional-python-dependencies: agixtsdk
needs: build-agixt
test-completions:
uses: josh-xt/AGiXT/.github/workflows/operation-test-with-jupyter.yml@main
with:
notebook: tests/completions-tests.ipynb
image: ghcr.io/${{ needs.build-agixt.outputs.github_user }}/${{ needs.build-agixt.outputs.repo_name }}:${{ github.sha }}
port: "7437"
db-connected: false
report-name: "completions-tests"
additional-python-dependencies: openai requests python-dotenv
needs: build-agixt