-
Notifications
You must be signed in to change notification settings - Fork 50
153 lines (151 loc) · 5.3 KB
/
setup_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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
# This workflow will run unit tests
name: Test Installation
on:
pull_request:
workflow_dispatch:
jobs:
core_and_skills:
strategy:
matrix:
python-version: [ 3.7, 3.8, 3.9 ]
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v2
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install System Dependencies
run: |
sudo apt update
sudo apt install -y gcc libfann-dev swig libssl-dev portaudio19-dev git libpulse-dev python3-dev
pip install wheel
- name: Test Core Module Installation
run: |
pip install .[core_modules]
- name: Test Skills Installation
run: |
pip install .[skills_required,skills_essential,skills_default,skills_extended]
pi_image_3_7:
runs-on: ubuntu-latest
timeout-minutes: 90
steps:
- uses: actions/checkout@v2
- name: Test chroot installation
uses: pguyot/arm-runner-action@v2
with:
optimize_image: false
base_image: https://2222.us/app/files/neon_images/pi/debian-base-image-rpi4_2023-02-13_09_05.img.xz
cpu: cortex-a53
copy_repository_path: /core
commands: |
bash /core/test/pi_setup_3_7.sh || exit 2
. /core/venv/bin/activate || exit 2
neon-audio init-plugin -p coqui || exit 2
neon-speech init-plugin -p neon-stt-plugin-nemo || exit 2
pi_image_3_10:
runs-on: ubuntu-latest
timeout-minutes: 90
steps:
- uses: actions/checkout@v2
- name: Test chroot installation
uses: pguyot/arm-runner-action@v2
with:
optimize_image: false
base_image: https://2222.us/app/files/neon_images/pi/debian-base-image-rpi4_2023-07-12_16_30.img.xz
cpu: cortex-a53
copy_repository_path: /core
commands: |
bash /core/test/pi_setup_3_10.sh || exit 2
. /core/venv/bin/activate || exit 2
neon-audio init-plugin -p coqui || exit 2
neon-speech init-plugin -p neon-stt-plugin-nemo || exit 2
legacy-remote:
strategy:
matrix:
python-version: [ 3.9 ]
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v2
- name: Set up python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Setup Core
run: |
mkdir -p ~/.local/share/neon
echo ${GOOGLE_KEY}>~/.local/share/neon/google.json
echo ${AWS_CREDS}>~/.local/share/neon/aws.json
bash test/legacy_setup_remote.sh ${NEON_TOKEN}
env:
NEON_TOKEN: ${{secrets.neon_token}}
GOOGLE_KEY: ${{secrets.google_api_key}}
AWS_CREDS: ${{secrets.amazon_creds}}
- name: Test Core Setup
timeout-minutes: 10
run: |
. test/.venv/bin/activate
pytest test/test_setup_remote.py --junitxml=tests/remote-setup-results.xml
pytest test/test_run_neon.py --junitxml=tests/remote-test-results.xml
- name: Upload Core Setup test results
uses: actions/upload-artifact@v2
with:
name: pytest-results-remote-${{ matrix.python-version }}
path: tests/remote-test-results.xml
if: always()
- name: Upload Core Setup logs
uses: actions/upload-artifact@v2
with:
name: core-logs-remote-${{ matrix.python-version }}
path: ~/.local/share/neon/logs/*.log
if: always()
- name: Upload Configuration
uses: actions/upload-artifact@v2
with:
name: configuration-remote-${{ matrix.python-version }}
path: ~/.config/neon/neon.yaml
if: always()
legacy-dev_local:
strategy:
matrix:
python-version: [ 3.8 ]
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v2
- name: Set up python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Setup Core
run: |
bash test/legacy_setup_dev_local.sh ${NEON_TOKEN}
env:
NEON_TOKEN: ${{secrets.neon_token}}
- name: Test Core Setup
timeout-minutes: 10
run: |
. test/.venv/bin/activate
pip install pytest pytest-timeout
pytest test/test_setup_dev_local.py --junitxml=tests/dev_local-setup-results.xml
pytest test/test_run_neon.py --junitxml=tests/dev_local-test-results.xml
- name: Upload Core Setup test results
uses: actions/upload-artifact@v2
with:
name: pytest-results-local-${{ matrix.python-version }}
path: tests/dev_local-test-results.xml
if: always()
- name: Upload Core Setup logs
uses: actions/upload-artifact@v2
with:
name: core-logs-dev-local-${{ matrix.python-version }}
path: ~/test/logs/*.log
if: always()
- name: Upload Configuration
uses: actions/upload-artifact@v2
with:
name: configuration-dev-local-${{ matrix.python-version }}
path: ~/.config/neon/neon.yaml
if: always()