115 lines (115 loc) · 4.12 KB
/
skill_test_intents.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
name: Skill Unit Tests
on:
workflow_call:
inputs:
runner:
type: string
default: "ubuntu-latest"
intent_file:
type: string
default: test/test_intents.yaml
skill_entrypoint:
type: string
default: action/skill/
timeout:
type: number
default: 15
test_padatious:
type: boolean
default: False
test_padacioso:
type: boolean
default: True
neon_versions:
type: string
default: "[ 3.7, 3.8, 3.9, '3.10' ]"
ovos_versions:
type: string
default: "[ 3.8, '3.10' ]"
jobs:
test_intents_ovos:
if: "${{ inputs.ovos_versions != '' }}"
runs-on: ${{inputs.runner}}
timeout-minutes: ${{inputs.timeout}}
strategy:
matrix:
python-version: ${{ fromJSON(inputs.ovos_versions) }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
path: action/skill/
- name: Checkout Scripts Repo
uses: actions/checkout@v4
with:
repository: NeonGeckoCom/.github
path: action/github/
- name: Set up python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
sudo apt update
sudo apt install -y gcc libfann-dev swig libssl-dev portaudio19-dev git libpulse-dev
pip install --upgrade pip
pip install wheel "cython<3.0.0" # TODO: cython patching https://github.com/yaml/pyyaml/issues/724
pip install --no-build-isolation pyyaml~=5.4 # TODO: patching https://github.com/yaml/pyyaml/issues/724
cd action/skill
pip install pytest mock ovos-core[skills]>=0.0.7 .[test]
- name: Test Skill Intents Padacioso
if: ${{ inputs.test_padacioso }}
run: |
export TEST_SKILL_ENTRYPOINT="${{inputs.skill_entrypoint}}"
export INTENT_ENGINE="padacioso"
export INTENT_TEST_FILE="action/skill/${{inputs.intent_file}}"
pytest action/github/test/test_skill_intents.py
- name: Test Skill Intents Padatious
if: ${{ inputs.test_padatious }}
run: |
export TEST_SKILL_ENTRYPOINT="${{inputs.skill_entrypoint}}"
export INTENT_ENGINE="padatious"
export INTENT_TEST_FILE="action/skill/${{inputs.intent_file}}"
pytest action/github/test/test_skill_intents.py
test_intents_neon:
if: "${{ inputs.neon_versions != '' }}"
runs-on: ${{inputs.runner}}
timeout-minutes: ${{inputs.timeout}}
strategy:
matrix:
python-version: ${{ fromJSON(inputs.neon_versions) }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
path: action/skill/
- name: Checkout Scripts Repo
uses: actions/checkout@v4
with:
repository: NeonGeckoCom/.github
path: action/github/
- name: Set up python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
sudo apt update
sudo apt install -y gcc libfann-dev swig libssl-dev portaudio19-dev git libpulse-dev
pip install --upgrade pip
cd action/skill
pip install pytest mock git+https://github.com/NeonGeckoCom/NeonCore@master#egg=neon_core .[test]
- name: Test Skill Intents Padacioso
if: ${{ inputs.test_padacioso }}
run: |
export TEST_SKILL_ENTRYPOINT="${{inputs.skill_entrypoint}}"
export INTENT_ENGINE="padacioso"
export INTENT_TEST_FILE="action/skill/${{inputs.intent_file}}"
pytest action/github/test/test_skill_intents.py
- name: Test Skill Intents Padatious
if: ${{ inputs.test_padatious }}
run: |
export TEST_SKILL_ENTRYPOINT="${{inputs.skill_entrypoint}}"
export INTENT_ENGINE="padatious"
export INTENT_TEST_FILE="action/skill/${{inputs.intent_file}}"
pytest action/github/test/test_skill_intents.py