-
Notifications
You must be signed in to change notification settings - Fork 18
106 lines (89 loc) · 3.46 KB
/
run-e2e-tests-on-azure.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
name: Run e2e tests on azure
# This workflow runs `e2e_tests/passing/happy_path` and `e2e_tests/passing/chitchat` tests
# using azure openai configurations
# the config files are located on the branch `azure-openai-release-3.9`
# the workflow checks out the `azure-openai-release-3.9` branch and runs the tests.
on:
schedule:
# Run cron job at 8AM Monday every week.
- cron: '0 8 * * 1'
workflow_dispatch:
env:
DEFAULT_PYTHON_VERSION: '3.9'
POETRY_VERSION: 1.8.2
jobs:
train-model-and-run-tests:
name: Train model
runs-on: ubuntu-22.04
steps:
- name: Checkout git repository 🕝
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
with:
ref: azure-openai-release-3.9
- name: Setup Python
uses: actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b
with:
python-version: ${{ env.DEFAULT_PYTHON_VERSION }}
- name: Install poetry 🦄
uses: Gr1N/setup-poetry@15821dc8a61bc630db542ae4baf6a7c19a994844
with:
poetry-version: ${{ env.POETRY_VERSION }}
- name: Load Poetry Cached Libraries ⬇
id: cache-poetry
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
with:
path: .venv
key: ${{ runner.os }}-poetry-${{ env.POETRY_VERSION }}-${{ env.DEFAULT_PYTHON_VERSION }}-${{ hashFiles('**/poetry.lock') }}
restore-keys: ${{ runner.os }}-poetry-${{ env.DEFAULT_PYTHON_VERSION }}
- name: Create virtual environment
if: steps.cache-poetry.outputs.cache-hit != 'true'
run: python -m venv create .venv
- name: Set up virtual environment
run: poetry config virtualenvs.in-project true
- name: Install Dependencies 📦
run: |
make install
- name: Train model
env:
OPENAI_API_KEY: ${{secrets.AZURE_OPENAI_API_KEY}}
RASA_PRO_LICENSE: ${{secrets.RASA_PRO_LICENSE}}
RASA_PRO_BETA_INTENTLESS: true
RASA_DUCKLING_HTTP_URL: ${{secrets.DUCKLING_URL}}
run: |
make train
- name: Persist model
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce
with:
name: trained-model
path: models/${{steps.upload_model.outputs.model}}.tar.gz
- name: Init LLM Cache
id: cache-llm
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
with:
path: .rasa
key: rasa-llm-cache
- name: Run action server
env:
OPENAI_API_KEY: ${{secrets.AZURE_OPENAI_API_KEY}}
RASA_PRO_LICENSE: ${{secrets.RASA_PRO_LICENSE}}
RASA_DUCKLING_HTTP_URL: ${{secrets.DUCKLING_URL}}
RASA_PRO_BETA_INTENTLESS: true
run: |
make actions &
- name: Run e2e happy_path tests
env:
OPENAI_API_KEY: ${{secrets.AZURE_OPENAI_API_KEY}}
RASA_PRO_LICENSE: ${{secrets.RASA_PRO_LICENSE}}
RASA_DUCKLING_HTTP_URL: ${{secrets.DUCKLING_URL}}
RASA_PRO_BETA_INTENTLESS: true
run: |
poetry run rasa test e2e e2e_tests/passing/happy_path
- name: Run e2e chitchat tests
if: always()
env:
OPENAI_API_KEY: ${{secrets.AZURE_OPENAI_API_KEY}}
RASA_PRO_LICENSE: ${{secrets.RASA_PRO_LICENSE}}
RASA_DUCKLING_HTTP_URL: ${{secrets.DUCKLING_URL}}
RASA_PRO_BETA_INTENTLESS: true
run: |
poetry run rasa test e2e e2e_tests/passing/chitchat