Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes for Rasa Pro #33

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
name: Test GH action - rasa init

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Create a new project
run: |
Expand Down Expand Up @@ -59,10 +59,10 @@ jobs:
name: Test GH action - Rasa X Demo

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Checkout Rasa X Demo
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
repository: RasaHQ/rasa-x-demo
path: rasa-x-demo
Expand Down Expand Up @@ -107,10 +107,10 @@ jobs:
needs: [test_action_x]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Checkout Rasa Demo
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
repository: RasaHQ/rasa-demo
path: rasa-demo
Expand Down Expand Up @@ -147,10 +147,10 @@ jobs:
name: Test GH action - Rasa Demo - ALL

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Checkout Rasa Demo
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
repository: RasaHQ/rasa-demo
path: rasa-demo
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/ci_summary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:
name: Test GH action - Rasa Demo - cfg 1

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Checkout Rasa Demo
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
repository: RasaHQ/rasa-demo
path: rasa-demo
Expand All @@ -41,7 +41,7 @@ jobs:
--stories tests/test_conversations.yml
publish_summary: 'false'

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: rasa-demo-cfg-1
path: rasa-demo/reports
Expand All @@ -52,15 +52,15 @@ jobs:
needs: [test_action_1]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Checkout Rasa Demo
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
repository: RasaHQ/rasa-demo
path: rasa-demo

- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4
with:
name: rasa-demo-cfg-1
path: rasa-demo/reports
Expand All @@ -85,7 +85,7 @@ jobs:
--stories tests/test_conversations.yml
github_token: ${{ secrets.GITHUB_TOKEN }}

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: rasa-demo-cfg-2
path: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
if: startsWith(github.event.ref, 'refs/tags')
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
steps:
# Checks-out GitHub repository
# more: https://github.com/actions/checkout
- uses: actions/checkout@v2
- uses: actions/checkout@v4

# Run rasa train and rasa test
- name: My first step
Expand All @@ -35,11 +35,13 @@ jobs:
| `workspace` | The root directory containing your Rasa Open Source project | `${{ github.workspace }}` |
| `train_type` | The types of training (available types: `core`/`nlu`/`all`) | `all` |
| `train_args` | Additional arguments passed to the `rasa train` command | `none` |
| `test_type` | The types of tests to run (available types: `core`/`nlu`/`all`) | `all` |
| `test_type` | The types of tests to run (available types: `core`/`nlu`/`all`/`none`) | `all` |
| `test_nlu_args` | Additional arguments passed to the `rasa test nlu` command | `none` |
| `test_core_args` | Additional arguments passed to the `rasa test core` command | `none` |
| `publish_summary` | Publish tests summary as a PR comment | `true` |
| `github_token` | GitHub Token - required to add a comment with summary | `none` |
| `rasa_pro_license` | Rasa Pro License - set RASA_PRO_LICENSE environment from secrets | `none` |
| `openai_api_key` | OpenAI API Key - set OPENAI_API_KEY environment from secrets | `none` |
| `configuration` | Model configuration file | `config.yml` |
| `model` | Path to a file with a model. Use existing model instead of training a new one | `none` |
| `cross_validation` | Switch on cross validation mode. Any provided model will be ignored | `false` |
Expand Down Expand Up @@ -81,6 +83,7 @@ jobs:
# In order to add a PR comment with summary
# a GH Token has to be pass to the GH action
github_token: ${{ secrets.GITHUB_TOKEN }}
rasa_pro_license: ${{ secrets.RASA_PRO_LICENSE }}
# ...
```

Expand Down Expand Up @@ -252,7 +255,7 @@ jobs:

# The 'actions/upload-artifact' action to upload files
# More: https://github.com/actions/upload-artifact
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: rasa-demo-cfg
path: |
Expand Down
13 changes: 13 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,14 @@ inputs:
description: 'GitHub Token - required to add a comment with summary'
required: false
default: ''
rasa_pro_license:
description: 'Rasa Pro License - set RASA_PRO_LICENSE environment'
required: false
default: ''
openai_api_key:
description: 'OPENAI_API_KEY'
required: false
default: ''
configuration:
description: 'Model configuration file'
required: true
Expand Down Expand Up @@ -149,6 +157,9 @@ runs:
core)
echo TEST_CORE="true" >> $GITHUB_ENV
;;
none)
echo "::warning::No tests will be run"
;;
*)
echo "::error::Unknown test type: ${{ inputs.test_type }} (use: core/nlu/all)"
exit 1
Expand All @@ -167,6 +178,8 @@ runs:
# Set docker args
echo DOCKER_ARGS="--rm --tmpfs ${{ inputs.tmpfs_directory }} -e HOME=/app -e MPLCONFIGDIR=/tmp/.mplconfigdir \
-e CI=${CI} -e RASA_TELEMETRY_ENABLED=${{ env.RASA_TELEMETRY_ENABLED }} -v ${{ github.workspace }}:/app/github_workspace \
-e RASA_PRO_LICENSE=${{ inputs.RASA_PRO_LICENSE }} \
-e OPENAI_API_KEY=${{ inputs.OPENAI_API_KEY }} \
-v ${{ inputs.workspace }}:/app -v ${{ inputs.workspace }}/models:/app/models \
-v ${{ inputs.workspace }}/${{ inputs.result_directory }}:/app/results" >> $GITHUB_ENV

Expand Down
Loading