forked from run-llama/llama-agents
-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (70 loc) · 2.39 KB
/
Copy pathtest.yml
File metadata and controls
78 lines (70 loc) · 2.39 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: Unit Testing
on:
pull_request:
push:
branches:
- main
env:
# Which Python from the matrix will be used to run the coverage check
COV_PYTHON_VERSION: 3.14
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
package: [llama-index-workflows, llama-index-utils-workflow, workflows-dev]
exclude:
- package: workflows-dev
python-version: "3.9"
- package: workflows-dev
python-version: "3.10"
- package: workflows-dev
python-version: "3.11"
- package: workflows-dev
python-version: "3.12"
- package: workflows-dev
python-version: "3.13"
include:
- package: llama-index-workflows
package_dir: packages/llama-index-workflows
- package: llama-index-utils-workflow
package_dir: packages/llama-index-utils-workflow
- package: workflows-dev
package_dir: packages/workflows-dev
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install uv and set the python version
uses: astral-sh/setup-uv@v6
with:
python-version: ${{ matrix.python-version }}
enable-cache: true
- name: Run tests
if: matrix.python-version != env.COV_PYTHON_VERSION
run: uv run --all-extras --directory ${{ matrix.package_dir }} -- pytest
- name: Run tests with coverage
if: matrix.python-version == env.COV_PYTHON_VERSION
run: uv run --all-extras --directory ${{ matrix.package_dir }} -- pytest --cov --cov-report=xml
- name: Report Coveralls
if: matrix.python-version == env.COV_PYTHON_VERSION
uses: coverallsapp/github-action@v2
with:
file: ${{ matrix.package_dir }}/coverage.xml
flag-name: ${{ matrix.package }}
parallel: true
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
coveralls-finish:
needs: test
runs-on: ubuntu-latest
if: github.repository == 'run-llama/workflows-py'
steps:
- name: Finalize Coveralls parallel jobs
uses: coverallsapp/github-action@v2
with:
parallel-finished: true
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}