-
Notifications
You must be signed in to change notification settings - Fork 58
60 lines (53 loc) · 1.6 KB
/
Copy pathbuild-test.yaml
File metadata and controls
60 lines (53 loc) · 1.6 KB
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
name: Build and Test
on:
push:
pull_request:
jobs:
react-build-test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: DashAI/front
steps:
- uses: actions/checkout@v3
- name: Enable Corepack and use Yarn 3
run: corepack enable
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "18.x"
cache: "yarn"
cache-dependency-path: DashAI/front/yarn.lock
- run: yarn install --frozen-lockfile
- run: yarn build
- uses: actions/upload-artifact@v4
with:
name: react-build
path: DashAI/front/build
retention-days: 1
- run: yarn test --passWithNoTests
pytest:
needs: react-build-test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ${{ github.event_name == 'pull_request' && fromJson('["3.10", "3.11", "3.12", "3.13"]') || fromJson('["3.12"]') }}
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v3
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
python-version: ${{ matrix.python-version }}
enable-cache: true
- name: Install dependencies
run: uv sync --locked --extra cpu --no-install-package llama-cpp-python
- name: Prepare frontend build
run: mkdir -p DashAI/front/build
- uses: actions/download-artifact@v4
with:
name: react-build
path: DashAI/front/build
- name: Test with pytest
run: uv run --no-sync pytest -v