Skip to content
This repository was archived by the owner on May 27, 2025. It is now read-only.

Commit 63a0f67

Browse files
authored
add basic cicd build pipeline (#34)
1 parent 3624d94 commit 63a0f67

File tree

5 files changed

+69
-3
lines changed

5 files changed

+69
-3
lines changed

.azdo/azure-pipeline.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ pool:
55
vmImage: ubuntu-latest
66

77
steps:
8+
# Component Governance does not support pyproject.toml yet.
9+
# For that reason, use toml-to-requirements to export dependencies into a requirements.txt file.
810
- script: |
911
pip install toml-to-requirements
1012
toml-to-req --toml-file pyproject.toml --poetry --optional-lists dev,test,backend,frontend

.github/workflows/dev.yaml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Dev Build
2+
on:
3+
workflow_dispatch: # triggered manually via the GitHub UI
4+
pull_request: # triggered when a PR is created or updated
5+
types:
6+
- opened
7+
- reopened
8+
- synchronize
9+
- ready_for_review
10+
paths: # only trigger on changes in specific directories
11+
- '.github/**/*.yaml'
12+
- 'backend/**'
13+
- 'docker/**'
14+
- 'infra/**'
15+
- 'poetry.lock'
16+
- 'pyproject.toml'
17+
jobs:
18+
lint-check:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@v4
23+
- name: Setup python
24+
uses: actions/setup-python@v5
25+
with:
26+
python-version: '3.10'
27+
- run: pip install ruff
28+
- run: |
29+
ruff check
30+
build-devcontainer:
31+
needs: [lint-check]
32+
runs-on: ubuntu-latest
33+
if: ${{ !github.event.pull_request.draft }}
34+
steps:
35+
- name: Checkout repository
36+
uses: actions/checkout@v4
37+
- name: Build docker image
38+
uses: docker/build-push-action@v2
39+
with:
40+
context: .devcontainer
41+
push: false
42+
build-backend:
43+
needs: [lint-check]
44+
runs-on: ubuntu-latest
45+
if: ${{ !github.event.pull_request.draft }}
46+
steps:
47+
- name: Checkout repository
48+
uses: actions/checkout@v4
49+
- name: Build docker image
50+
uses: docker/build-push-action@v2
51+
with:
52+
context: .
53+
file: docker/Dockerfile-backend
54+
push: false
55+
build-frontend:
56+
needs: [lint-check]
57+
runs-on: ubuntu-latest
58+
if: ${{ !github.event.pull_request.draft }}
59+
steps:
60+
- name: Checkout repository
61+
uses: actions/checkout@v4
62+
- name: Build docker image
63+
uses: docker/build-push-action@v2
64+
with:
65+
context: .
66+
file: docker/Dockerfile-frontend
67+
push: false

backend/src/api/experimental.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import inspect
55
import json
66
import os
7-
import traceback
87
from queue import Queue
98
from threading import Thread
109

backend/src/api/index.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import asyncio
55
import inspect
66
import os
7-
import traceback
87
from typing import cast
98

109
import yaml

backend/src/main.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
# Licensed under the MIT License.
33

44
import os
5-
import traceback
65

76
from fastapi import (
87
Depends,

0 commit comments

Comments
 (0)