Skip to content

Commit 576301e

Browse files
committed
reconstruct CI for backend
1 parent 2a60821 commit 576301e

File tree

2 files changed

+47
-3
lines changed

2 files changed

+47
-3
lines changed

.github/workflows/ci-backend.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: CI - Build backend
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- "backend/**"
8+
pull_request:
9+
branches: [main]
10+
paths:
11+
- "backend/**"
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
20+
- name: Set up Python
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: "3.11"
24+
25+
- name: Install dependencies
26+
run: |
27+
cd backend
28+
python -m pip install --upgrade pip
29+
pip install -r requirements.txt
30+
31+
- name: Archive build
32+
run: |
33+
cd backend
34+
mkdir build
35+
cp app.py requirements.txt vercel.json build/
36+
tar -czf fastapi-build-${{ github.run_number }}.tar.gz build
37+
mv fastapi-build-${{ github.run_number }}.tar.gz $GITHUB_WORKSPACE/
38+
39+
40+
- name: Upload artifact
41+
uses: actions/upload-artifact@v4
42+
with:
43+
name: fastapi-build-${{ github.run_number }}
44+
path: fastapi-build-${{ github.run_number }}.tar.gz

shatter-backend/tsconfig.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
"esModuleInterop": true,
77
"strict": true,
88
"sourceMap": true,
9-
"outDir": "dist",
9+
"outDir": "./dist",
10+
"rootDir": "./src",
1011
"lib": ["ES2021"],
11-
"allowImportingTsExtensions": true,
12-
"noEmit": true
12+
"noEmit": false
1313
},
1414
"include": ["src/**/*"]
1515
}

0 commit comments

Comments
 (0)