-
Notifications
You must be signed in to change notification settings - Fork 1
94 lines (75 loc) · 2.15 KB
/
pr_build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: PR checks
on:
pull_request:
types: [opened, reopened, synchronize]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.BRANCH }}
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
cache: gradle
cache-dependency-path: backend/build.gradle.kts
- name: Run Java backend tests
run: ./gradlew test
working-directory: backend
- name: Build with Gradle
run: ./gradlew build
working-directory: backend
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 9
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
cache-dependency-path: ui/pnpm-lock.yaml
- name: Install UI Dependencies
run: pnpm install --no-frozen-lockfile
working-directory: ui
- name: Lint with PNPM
run: pnpm lint
working-directory: ui
- name: Run frontend tests
run: pnpm test
working-directory: ui
- name: Build with PNPM
run: pnpm build
working-directory: ui
- name: Set up Python
uses: pdm-project/setup-pdm@v3
with:
python-version: '3.10'
cache: false
- name: Cache pdm cache folder
uses: actions/cache@v4
id: python_cache
with:
path: ./llm-service/.venv
key: pdm-venv-${{ hashFiles('./llm-service/pdm.lock') }}
- name: Install Python dependencies
if: steps.python_cache.outputs.cache-hit != 'true'
run: |
pdm install
working-directory: llm-service
- name: Run ruff
run: |
pdm run ruff check app
working-directory: llm-service
- name: Run mypy
run: |
pdm run mypy app
working-directory: llm-service
- name: Test with pytest
run: |
pdm run pytest -sxvvra
working-directory: llm-service