mirror of
https://github.com/Azure-Samples/graphrag-accelerator.git
synced 2025-06-27 04:39:57 +00:00
add basic cicd build pipeline (#34)
This commit is contained in:
parent
3624d9446d
commit
63a0f67230
@ -5,6 +5,8 @@ pool:
|
||||
vmImage: ubuntu-latest
|
||||
|
||||
steps:
|
||||
# Component Governance does not support pyproject.toml yet.
|
||||
# For that reason, use toml-to-requirements to export dependencies into a requirements.txt file.
|
||||
- script: |
|
||||
pip install toml-to-requirements
|
||||
toml-to-req --toml-file pyproject.toml --poetry --optional-lists dev,test,backend,frontend
|
||||
|
67
.github/workflows/dev.yaml
vendored
Normal file
67
.github/workflows/dev.yaml
vendored
Normal file
@ -0,0 +1,67 @@
|
||||
name: Dev Build
|
||||
on:
|
||||
workflow_dispatch: # triggered manually via the GitHub UI
|
||||
pull_request: # triggered when a PR is created or updated
|
||||
types:
|
||||
- opened
|
||||
- reopened
|
||||
- synchronize
|
||||
- ready_for_review
|
||||
paths: # only trigger on changes in specific directories
|
||||
- '.github/**/*.yaml'
|
||||
- 'backend/**'
|
||||
- 'docker/**'
|
||||
- 'infra/**'
|
||||
- 'poetry.lock'
|
||||
- 'pyproject.toml'
|
||||
jobs:
|
||||
lint-check:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Setup python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.10'
|
||||
- run: pip install ruff
|
||||
- run: |
|
||||
ruff check
|
||||
build-devcontainer:
|
||||
needs: [lint-check]
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ !github.event.pull_request.draft }}
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Build docker image
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .devcontainer
|
||||
push: false
|
||||
build-backend:
|
||||
needs: [lint-check]
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ !github.event.pull_request.draft }}
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Build docker image
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
file: docker/Dockerfile-backend
|
||||
push: false
|
||||
build-frontend:
|
||||
needs: [lint-check]
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ !github.event.pull_request.draft }}
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Build docker image
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
file: docker/Dockerfile-frontend
|
||||
push: false
|
@ -4,7 +4,6 @@
|
||||
import inspect
|
||||
import json
|
||||
import os
|
||||
import traceback
|
||||
from queue import Queue
|
||||
from threading import Thread
|
||||
|
||||
|
@ -4,7 +4,6 @@
|
||||
import asyncio
|
||||
import inspect
|
||||
import os
|
||||
import traceback
|
||||
from typing import cast
|
||||
|
||||
import yaml
|
||||
|
@ -2,7 +2,6 @@
|
||||
# Licensed under the MIT License.
|
||||
|
||||
import os
|
||||
import traceback
|
||||
|
||||
from fastapi import (
|
||||
Depends,
|
||||
|
Loading…
x
Reference in New Issue
Block a user