Skip to content

Commit

Permalink
remote tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rgstephens committed Nov 29, 2024
1 parent 9cbc2cf commit 809c26d
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 21 deletions.
42 changes: 21 additions & 21 deletions .github/workflows/test-train-model.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,31 +18,31 @@ jobs:
uses: actions/setup-python@v1
with:
python-version: 3.10.15
# - name: Install dependencies
# run: |
# python -m pip install -U pip
# pip install -r requirements-dev.txt
- name: Install dependencies
run: |
python -m pip install -U pip
pip install -r requirements-dev.txt
- name: Code Formatting Tests
working-directory: ${{ github.workspace }}
run: |
make lint
type-testing:
name: Type Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.10
uses: actions/setup-python@v1
with:
python-version: 3.10.15
# - name: Install dependencies
# run: |
# python -m pip install -U pip
# pip install -r requirements-dev.txt
- name: Type Checking
working-directory: ${{ github.workspace }}
run: |
make types
# type-testing:
# name: Type Tests
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v1
# - name: Set up Python 3.10
# uses: actions/setup-python@v1
# with:
# python-version: 3.10.15
# - name: Install dependencies
# run: |
# python -m pip install -U pip
# pip install -r requirements-dev.txt
# - name: Type Checking
# working-directory: ${{ github.workspace }}
# run: |
# make types
training-testing:
name: Training and Testing
runs-on: ubuntu-latest
Expand Down
54 changes: 54 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
help:
@echo "make"
@echo " clean"
@echo " Remove Python/build artifacts."
@echo " formatter"
@echo " Apply black formatting to code."
@echo " lint"
@echo " Lint code with flake8, and check if black formatter should be applied."
@echo " types"
@echo " Check for type errors using pytype."
@echo " validate"
@echo " Runs the rasa data validate to verify data."
@echo " test"
@echo " Runs the rasa test suite checking for issues."
@echo " crossval"
@echo " Runs the rasa cross validation tests and creates results.md"
@echo " shell"
@echo " Runs the rasa train and rasa shell for testing"


clean:
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
rm -rf build/
rm -rf .pytype/
rm -rf dist/
rm -rf docs/_build

formatter:
black actions --line-length 79

lint:
flake8 actions
black --check actions

types:
pytype --keep-going actions

validate:
rasa train
rasa data validate --debug

test:
rasa train
rasa test --fail-on-prediction-errors

crossval:
rasa test nlu -f 5 --cross-validation
python format_results.py

shell:
rasa train --debug
rasa shell --debug
7 changes: 7 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
-r requirements.txt

# lint/format/types
black==24.10.0
flake8==7.1.1
pytype==2024.10.11
# pre-commit
3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
rasa-pro~=3.10.11
rasa-sdk~=3.10.1 # if you change this, make sure to change the Dockerfile to match
# -r actions/requirements-actions.txt

0 comments on commit 809c26d

Please sign in to comment.