Skip to content

Github Actions Workflow setup #9

Github Actions Workflow setup

Github Actions Workflow setup #9

Workflow file for this run

name: Basic Workflow test / Docker Image Builder
on:
push:
branches: ["master", "dev"]
pull_request:
branches: ["dev"]
jobs:
run_backend_tests:
runs-on: ubuntu-latest
steps:
- name: Enable Access for Branch for Workflow
uses: actions/checkout@v2
with:
submodules: "recursive"
- name: setup python
uses: actions/setup-python@v2
with:
python-version: 3.12.2
- name: Install Poetry
working-directory: autonomous_agent_api
run: pip install poetry==1.8.2
- name: Install Dependencies
working-directory: autonomous_agent_api
run: |
poetry install
poetry run prisma generate
- name: Run test cases
working-directory: autonomous_agent_api
env:
DATABASE_URL : ""
run: poetry run pytest -m github_actions
build_on_pr:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
timeout-minutes : 30
steps:
- name: Checkout code with submodules
uses: actions/checkout@v2
with:
submodules: "recursive"
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Docker image
uses: docker/build-push-action@v5
with:
push: false
tags: backend:latest
context: autonomous_agent_api