Skip to content

Add Zcash support (#1590) #1294

Add Zcash support (#1590)

Add Zcash support (#1590) #1294

name: Build and Test
on:
push:
paths-ignore:
- '**/*.md'
- 'docs/**'
- 'LICENSE'
- 'book.json'
- 'SECURITY.md'
- 'CODE_OF_CONDUCT.md'
jobs:
lint:
runs-on: ubuntu-22.04
name: Python Black Lint Check
steps:
- name: Check out repository
uses: actions/checkout@v4.2.2
- name: Set up Python
uses: actions/setup-python@v5.3.0
with:
python-version: 3.8
- name: Install Python dependencies
run: pip install black nbqa
- name: Run Black on Python files
run: black --check $(find . -type f -name "*.py")
build:
uses: ./.github/workflows/docker.yml
with:
registry-dockerhub-enable: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
registry-repo-name: AGiXT
registry-readme: ./docs/README.md
secrets:
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
test-agixt-postgres:
uses: ./.github/workflows/tests.yml
permissions:
contents: read
packages: read
with:
notebook: tests/endpoint-tests.ipynb
image: ${{ needs.build.outputs.primary-image }}
port: "7437"
database-type: "postgresql"
report-name: "agixt-postgres-tests"
needs: build
secrets:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
test-agixt-sqlite:
uses: ./.github/workflows/tests.yml
permissions:
contents: read
packages: read
with:
notebook: tests/endpoint-tests.ipynb
image: ${{ needs.build.outputs.primary-image }}
port: "7437"
database-type: "sqlite"
report-name: "agixt-sqlite-tests"
needs: build
secrets:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
deploy:
runs-on: ubuntu-22.04
permissions:
contents: read
packages: read
name: Deploy to dev server
needs: build
if: github.ref == 'refs/heads/main'
steps:
- name: Deploy Application
id: deploy
run: |
RESPONSE=$(curl -s -w "\nHTTP_STATUS_CODE:%{http_code}" -X POST "${{ secrets.DEPLOY_URI }}" \
-H "Content-Type: application/json" \
-H "X-API-Key: ${{ secrets.DEPLOY_SECRET }}" \
-d '{"domain": "${{ secrets.DEPLOY_DOMAIN }}"}')
HTTP_STATUS=$(echo "$RESPONSE" | grep -o "HTTP_STATUS_CODE:[0-9]*" | cut -d: -f2)
RESPONSE_BODY=$(echo "$RESPONSE" | sed '/HTTP_STATUS_CODE:/d')
echo "deploy_response=$RESPONSE_BODY" >> $GITHUB_OUTPUT
echo "deploy_status=$HTTP_STATUS" >> $GITHUB_OUTPUT
if [ "$HTTP_STATUS" -ge 200 ] && [ "$HTTP_STATUS" -lt 300 ]; then
echo "Deployment successful with status $HTTP_STATUS"
else
echo "Deployment failed with status $HTTP_STATUS"
exit 1
fi
deploy-release:
runs-on: ubuntu-22.04
permissions:
contents: read
packages: read
name: Deploy to everything.software
needs: build
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
steps:
- name: Deploy Release Application
id: deploy-release
run: |
RESPONSE=$(curl -s -w "\nHTTP_STATUS_CODE:%{http_code}" -X POST "${{ secrets.DEPLOY_URI }}" \
-H "Content-Type: application/json" \
-H "X-API-Key: ${{ secrets.DEPLOY_SECRET }}" \
-d '{"domain": "everything.software"}')
HTTP_STATUS=$(echo "$RESPONSE" | grep -o "HTTP_STATUS_CODE:[0-9]*" | cut -d: -f2)
RESPONSE_BODY=$(echo "$RESPONSE" | sed '/HTTP_STATUS_CODE:/d')
echo "deploy_response=$RESPONSE_BODY" >> $GITHUB_OUTPUT
echo "deploy_status=$HTTP_STATUS" >> $GITHUB_OUTPUT
if [ "$HTTP_STATUS" -ge 200 ] && [ "$HTTP_STATUS" -lt 300 ]; then
echo "Release deployment successful with status $HTTP_STATUS"
else
echo "Release deployment failed with status $HTTP_STATUS"
exit 1
fi