-
Notifications
You must be signed in to change notification settings - Fork 1
130 lines (110 loc) · 3.18 KB
/
unit-tests.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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# Copyright (C) 2024-2025 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
name: Unit tests
on:
pull_request:
branches: [ main ]
paths:
- 'src/comps/**'
- 'src/tests/unit/**'
- '.github/workflows/unit-tests.yml'
- '**.ini'
- '!**.md'
push:
branches: [ main ]
paths:
- 'src/comps/**'
- 'src/tests/unit/**'
- '.github/workflows/unit-tests.yml'
- '**.ini'
- '!**.md'
jobs:
unit-tests:
if: ${{ (github.event.repository.visibility == 'public') && (github.repository_owner == 'opea-project') }}
name: Unit tests
runs-on: ubuntu-22.04
defaults:
run:
shell: bash
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Clean up disk space
run: |
sudo rm -rf \
/usr/local/lib/android \
/usr/share/dotnet \
"$AGENT_TOOLSDIRECTORY"
df -h /
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install test prerequisites
run: sudo apt-get update && sudo apt-get -y install libgl1 libglx-mesa0 tox
- name: Checkout code to folder
uses: actions/checkout@v4
with:
path: repo
- name: Ingestion unit tests
if: success() || failure()
uses: ./.github/actions/unit-tests
with:
test-name: ingestion_unit_tests
- name: Prompt registry unit tests
if: success() || failure()
uses: ./.github/actions/unit-tests
with:
test-name: prompt_registry_unit_tests
- name: Retrievers unit tests
if: success() || failure()
uses: ./.github/actions/unit-tests
with:
test-name: retrievers_unit_tests
- name: Vectorstores unit tests
if: success() || failure()
uses: ./.github/actions/unit-tests
with:
test-name: vectorstores_unit_tests
- name: Reranks unit tests
if: success() || failure()
uses: ./.github/actions/unit-tests
with:
test-name: reranks_unit_tests
- name: Embeddings unit tests
if: success() || failure()
uses: ./.github/actions/unit-tests
with:
test-name: embeddings_unit_tests
- name: Dataprep unit tests
if: success() || failure()
uses: ./.github/actions/unit-tests
with:
test-name: dataprep_unit_tests
- name: LLMs unit tests
if: success() || failure()
uses: ./.github/actions/unit-tests
with:
test-name: llms_unit_tests
- name: Guardrails input unit tests
if: success() || failure()
uses: ./.github/actions/unit-tests
with:
test-name: llm_guard_input_guardrail_unit_tests
- name: Guardrails output unit tests
if: success() || failure()
uses: ./.github/actions/unit-tests
with:
test-name: llm_guard_output_guardrail_unit_tests
- name: Language detection unit tests
if: success() || failure()
uses: ./.github/actions/unit-tests
with:
test-name: language_detection_unit_tests
- name: EDP unit tests
if: success() || failure()
uses: ./.github/actions/unit-tests
with:
test-name: edp_unit_tests