Skip to content

Commit

Permalink
Update intent tests to use Minerva tests if available (#69)
Browse files Browse the repository at this point in the history
* Update intent tests to use Minerva tests if available

* Fix typo in intent tests

* Troubleshoot tests using old class

* Fix checkout to actually test changes

* Fix typo in checkout branch spec

* Update entrypoint envvar handling for actions backwards-compat

* Validate tests under both cores (should make no difference anymore)

* Add exception to catch old test case usage

* Install test extras for skill intent tests

* Troubleshoot skill extra deps installation

* Troubleshoot skill extra deps installation per pypa/pip#2785

* Fix typo in skill intent test import

* Troublesthoot ovos-core intent test failure
Add default `XDG_CACHE_HOME` env spec for test failure

* Add default `skill_entrypoint` to match resource test logic

* Add missing envvar export

* Remove test exception
Remove branch spec from action checkout

---------

Co-authored-by: Daniel McKnight <[email protected]>
  • Loading branch information
NeonDaniel and NeonDaniel authored Jan 15, 2024
1 parent a4a3a8d commit e0ea277
Show file tree
Hide file tree
Showing 2 changed files with 223 additions and 202 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/skill_test_intents.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
intent_file:
type: string
default: test/test_intents.yaml
skill_entrypoint:
type: string
default: action/skill/
timeout:
type: number
default: 15
Expand Down Expand Up @@ -52,16 +55,19 @@ jobs:
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
pip install pytest mock ovos-core[skills,skills_lgpl]>=0.0.7 action/skill/
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
Expand Down Expand Up @@ -91,16 +97,19 @@ jobs:
sudo apt update
sudo apt install -y gcc libfann-dev swig libssl-dev portaudio19-dev git libpulse-dev
pip install --upgrade pip
pip install pytest mock git+https://github.com/NeonGeckoCom/NeonCore@master#egg=neon_core action/skill/
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
Loading

0 comments on commit e0ea277

Please sign in to comment.