From 4f582628a462a1cedc8ff28be916c99832412aff Mon Sep 17 00:00:00 2001 From: Greg Stephens Date: Thu, 28 Nov 2024 21:50:57 -0800 Subject: [PATCH 1/8] add rasa_pro_license --- README.md | 2 ++ action.yml | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/README.md b/README.md index 15f8d79..8178cc4 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,7 @@ jobs: | `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` | | `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` | @@ -81,6 +82,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 }} # ... ``` diff --git a/action.yml b/action.yml index 1ece9fb..3835c56 100644 --- a/action.yml +++ b/action.yml @@ -61,6 +61,10 @@ 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: '' configuration: description: 'Model configuration file' required: true @@ -167,6 +171,7 @@ 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=${{ secrets.RASA_PRO_LICENSE }} \ -v ${{ inputs.workspace }}:/app -v ${{ inputs.workspace }}/models:/app/models \ -v ${{ inputs.workspace }}/${{ inputs.result_directory }}:/app/results" >> $GITHUB_ENV From 9d27452b2ae007208c03c19a3b7cf80a5caa0389 Mon Sep 17 00:00:00 2001 From: Greg Stephens Date: Thu, 28 Nov 2024 21:59:46 -0800 Subject: [PATCH 2/8] env --- action.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 3835c56..8c2ff3c 100644 --- a/action.yml +++ b/action.yml @@ -119,6 +119,8 @@ runs: steps: - name: Set environment shell: bash + env: + RASA_PRO_LICENSE: ${{ secrets.RASA_PRO_LICENSE }} run: |- mkdir -p ${{ inputs.workspace }}/models chmod 777 ${{ inputs.workspace }}/models @@ -171,7 +173,7 @@ 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=${{ secrets.RASA_PRO_LICENSE }} \ + -e RASA_PRO_LICENSE=${{ env.RASA_PRO_LICENSE }} \ -v ${{ inputs.workspace }}:/app -v ${{ inputs.workspace }}/models:/app/models \ -v ${{ inputs.workspace }}/${{ inputs.result_directory }}:/app/results" >> $GITHUB_ENV From 416cd9214d16229b5e0060da53f19ce9bcd1b624 Mon Sep 17 00:00:00 2001 From: Greg Stephens Date: Thu, 28 Nov 2024 22:03:36 -0800 Subject: [PATCH 3/8] env --- action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index 8c2ff3c..580bef0 100644 --- a/action.yml +++ b/action.yml @@ -118,9 +118,9 @@ runs: using: "composite" steps: - name: Set environment - shell: bash env: RASA_PRO_LICENSE: ${{ secrets.RASA_PRO_LICENSE }} + shell: bash run: |- mkdir -p ${{ inputs.workspace }}/models chmod 777 ${{ inputs.workspace }}/models @@ -173,7 +173,7 @@ 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=${{ env.RASA_PRO_LICENSE }} \ + -e RASA_PRO_LICENSE=${RASA_PRO_LICENSE} \ -v ${{ inputs.workspace }}:/app -v ${{ inputs.workspace }}/models:/app/models \ -v ${{ inputs.workspace }}/${{ inputs.result_directory }}:/app/results" >> $GITHUB_ENV From 6d861d1c53bf6f7a07881566d4b3d3e32d168ff8 Mon Sep 17 00:00:00 2001 From: Greg Stephens Date: Thu, 28 Nov 2024 22:07:52 -0800 Subject: [PATCH 4/8] inputs --- action.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/action.yml b/action.yml index 580bef0..108e635 100644 --- a/action.yml +++ b/action.yml @@ -118,8 +118,6 @@ runs: using: "composite" steps: - name: Set environment - env: - RASA_PRO_LICENSE: ${{ secrets.RASA_PRO_LICENSE }} shell: bash run: |- mkdir -p ${{ inputs.workspace }}/models @@ -173,7 +171,7 @@ 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=${RASA_PRO_LICENSE} \ + -e RASA_PRO_LICENSE=${{ inputs.RASA_PRO_LICENSE }} \ -v ${{ inputs.workspace }}:/app -v ${{ inputs.workspace }}/models:/app/models \ -v ${{ inputs.workspace }}/${{ inputs.result_directory }}:/app/results" >> $GITHUB_ENV From 7d4c06786c5f0ab7f009e209aaef5afe6652ef5c Mon Sep 17 00:00:00 2001 From: Greg Stephens Date: Thu, 28 Nov 2024 22:24:46 -0800 Subject: [PATCH 5/8] openai api key --- README.md | 3 ++- action.yml | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8178cc4..049d2ce 100644 --- a/README.md +++ b/README.md @@ -35,12 +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` | diff --git a/action.yml b/action.yml index 108e635..e741337 100644 --- a/action.yml +++ b/action.yml @@ -65,6 +65,10 @@ inputs: 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 @@ -153,6 +157,9 @@ runs: core) echo TEST_CORE="true" >> $GITHUB_ENV ;; + none) + echo "No tests will be run" + ;; *) echo "::error::Unknown test type: ${{ inputs.test_type }} (use: core/nlu/all)" exit 1 @@ -172,6 +179,7 @@ runs: 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 From dcfc1f26379ec7e94644482c51244735ea01f1ca Mon Sep 17 00:00:00 2001 From: Greg Stephens Date: Fri, 29 Nov 2024 10:10:36 -0800 Subject: [PATCH 6/8] warning on no tests --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index e741337..6b13a23 100644 --- a/action.yml +++ b/action.yml @@ -158,7 +158,7 @@ runs: echo TEST_CORE="true" >> $GITHUB_ENV ;; none) - echo "No tests will be run" + echo "::warning::No tests will be run" ;; *) echo "::error::Unknown test type: ${{ inputs.test_type }} (use: core/nlu/all)" From c07e080325e8b6aa97396feb920e82bf49eac191 Mon Sep 17 00:00:00 2001 From: Greg Stephens Date: Tue, 3 Dec 2024 21:35:44 -0800 Subject: [PATCH 7/8] update action versions --- .github/workflows/ci_summary.yml | 14 +++++++------- README.md | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci_summary.yml b/.github/workflows/ci_summary.yml index 3116abb..a8d57d2 100644 --- a/.github/workflows/ci_summary.yml +++ b/.github/workflows/ci_summary.yml @@ -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 @@ -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 @@ -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 @@ -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: | diff --git a/README.md b/README.md index 049d2ce..78e83fc 100644 --- a/README.md +++ b/README.md @@ -255,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: | From 9b18cfc8b3bcfca77508704ea37cde4981214d83 Mon Sep 17 00:00:00 2001 From: Greg Stephens Date: Tue, 3 Dec 2024 21:52:30 -0800 Subject: [PATCH 8/8] more version updates --- .github/workflows/ci.yml | 14 +++++++------- .github/workflows/release.yml | 2 +- README.md | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 543e9d5..c66425b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: | @@ -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 @@ -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 @@ -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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0d1cdf5..a29def6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 diff --git a/README.md b/README.md index 78e83fc..3158223 100644 --- a/README.md +++ b/README.md @@ -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