Skip to content

Commit

Permalink
Merge branch 'main' into switch-to-mypy-part1
Browse files Browse the repository at this point in the history
  • Loading branch information
m-vdb committed Mar 15, 2021
2 parents 277b8a3 + 8b9238f commit b9705f4
Show file tree
Hide file tree
Showing 16 changed files with 456 additions and 194 deletions.
84 changes: 84 additions & 0 deletions .github/workflows/ci-docs-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: Docs Tests
on:
push:
branches:
- main
tags:
- '*'
pull_request:
types: [opened, synchronize, labeled]

env:
DEFAULT_PYTHON_VERSION: '3.7'

jobs:
changes:
name: Check for file changes
runs-on: ubuntu-latest
outputs:
docs: ${{ steps.filter.outputs.docs }}
steps:
- uses: actions/checkout@v2
- uses: RasaHQ/pr-changed-files-filter@c4f7116a04b8a4596313469429e2ad235f59d9c4
id: filter
with:
token: ${{ secrets.GITHUB_TOKEN }}
filters: .github/change_filters.yml

test_documentation:
name: Test Documentation
runs-on: ubuntu-latest
needs: [ changes ]
if: needs.changes.outputs.docs == 'true'

steps:
- name: Checkout git repository 🕝
uses: actions/checkout@v2

- name: Set up Python ${{ env.DEFAULT_PYTHON_VERSION }} 🐍
uses: actions/setup-python@v1
with:
python-version: ${{ env.DEFAULT_PYTHON_VERSION }}

- name: Set up Node 12.x 🦙
uses: actions/setup-node@v1
with:
node-version: '12.x'

- name: Read Poetry Version 🔢
run: |
echo "POETRY_VERSION=$(scripts/poetry-version.sh)" >> $GITHUB_ENV
shell: bash

- name: Install poetry 🦄
uses: Gr1N/setup-poetry@v4
with:
poetry-version: ${{ env.POETRY_VERSION }}

- name: Load Poetry Cached Libraries ⬇
uses: actions/cache@v2
with:
path: ~/.cache/pypoetry/virtualenvs
key: ${{ runner.os }}-poetry-${{ env.POETRY_VERSION }}-${{ env.DEFAULT_PYTHON_VERSION }}-${{ hashFiles('**/poetry.lock') }}-${{ secrets.POETRY_CACHE_VERSION }}
restore-keys: ${{ runner.os }}-poetry-${{ env.DEFAULT_PYTHON_VERSION }}

- name: Load Yarn Cached Packages ⬇
uses: actions/cache@v2
with:
path: docs/node_modules
key: ${{ runner.os }}-yarn-12.x-${{ hashFiles('docs/yarn.lock') }}
restore-keys: ${{ runner.os }}-yarn-12.x

- name: Install Dependencies 📦
run: |
sudo apt-get -y install libpq-dev
make install-full install-docs
- name: Run Swagger 🕵️‍♀️
run: |
npm install -g swagger-cli
swagger-cli validate docs/static/spec/action-server.yml
swagger-cli validate docs/static/spec/rasa.yml
- name: Test Docs 🕸
run: make test-docs
86 changes: 24 additions & 62 deletions .github/workflows/continous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,16 @@ env:
# needed to fix issues with boto during testing:
# https://github.com/travis-ci/travis-ci/issues/7940
BOTO_CONFIG: /dev/null

IS_TAG_BUILD: ${{ startsWith(github.event.ref, 'refs/tags') }}
DOCKERHUB_USERNAME: tmbo
DEFAULT_PYTHON_VERSION: '3.7'

# for wait_for_xx jobs
WAIT_TIMEOUT_SECS: 3000
WAIT_INTERVAL_SECS: 60


jobs:
changes:
name: Check for file changes
Expand All @@ -48,72 +54,28 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
filters: .github/change_filters.yml

documentation:
name: Test Documentation

wait_for_docs_tests:
# Looks for doc test workflows and waits for it to complete successfully
# Runs on tag pushes and pushes to main exclusively, as it is a dependency of release jobs
name: Wait for docs tests
runs-on: ubuntu-latest
needs: [changes]
needs: [ changes ]

steps:
- name: Checkout git repository 🕝
if: needs.changes.outputs.docs == 'true'
uses: actions/checkout@v2
- name: Checkout git repository 🕝
uses: actions/checkout@v2

- name: Set up Python ${{ env.DEFAULT_PYTHON_VERSION }} 🐍
if: needs.changes.outputs.docs == 'true'
uses: actions/setup-python@v1
with:
python-version: ${{ env.DEFAULT_PYTHON_VERSION }}

- name: Set up Node 12.x 🦙
if: needs.changes.outputs.docs == 'true'
uses: actions/setup-node@v1
with:
node-version: '12.x'

- name: Read Poetry Version 🔢
if: needs.changes.outputs.docs == 'true'
run: |
echo "POETRY_VERSION=$(scripts/poetry-version.sh)" >> $GITHUB_ENV
shell: bash

- name: Install poetry 🦄
if: needs.changes.outputs.docs == 'true'
uses: Gr1N/setup-poetry@v4
with:
poetry-version: ${{ env.POETRY_VERSION }}

- name: Load Poetry Cached Libraries ⬇
if: needs.changes.outputs.docs == 'true'
uses: actions/cache@v2
with:
path: ~/.cache/pypoetry/virtualenvs
key: ${{ runner.os }}-poetry-${{ env.POETRY_VERSION }}-${{ env.DEFAULT_PYTHON_VERSION }}-${{ hashFiles('**/poetry.lock') }}-${{ secrets.POETRY_CACHE_VERSION }}
restore-keys: ${{ runner.os }}-poetry-${{ env.DEFAULT_PYTHON_VERSION }}

- name: Load Yarn Cached Packages ⬇
if: needs.changes.outputs.docs == 'true'
uses: actions/cache@v2
with:
path: docs/node_modules
key: ${{ runner.os }}-yarn-12.x-${{ hashFiles('docs/yarn.lock') }}
restore-keys: ${{ runner.os }}-yarn-12.x

- name: Install Dependencies 📦
if: needs.changes.outputs.docs == 'true'
run: |
sudo apt-get -y install libpq-dev
make install-full install-docs
- name: Run Swagger 🕵️‍♀️
if: needs.changes.outputs.docs == 'true'
run: |
npm install -g swagger-cli
swagger-cli validate docs/static/spec/action-server.yml
swagger-cli validate docs/static/spec/rasa.yml
- name: Wait for doc tests
uses: fountainhead/action-wait-for-check@4699210ccc66e2a13260803fadbb77085421b891
id: wait-for-doc-tests
with:
token: ${{ secrets.GITHUB_TOKEN }}
checkName: Test Documentation
ref: ${{ github.head_ref || github.sha }}
timeoutSeconds: ${{ env.WAIT_TIMEOUT_SECS }}
intervalSeconds: ${{ env.WAIT_INTERVAL_SECS }}

- name: Test Docs 🕸
if: needs.changes.outputs.docs == 'true'
run: make test-docs

quality:
name: Code Quality
Expand Down Expand Up @@ -682,7 +644,7 @@ jobs:

# deploy will only be run when there is a tag available
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') && github.repository == 'RasaHQ/rasa'
needs: [quality, test, documentation, docker] # only run after all other stages succeeded
needs: [quality, test, wait_for_docs_tests, docker] # only run after all other stages succeeded

steps:
- name: Checkout git repository 🕝
Expand Down
2 changes: 2 additions & 0 deletions changelog/7450.bugfix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Rule tracker states no longer include the initial value of slots.
Rules now only require slot values when explicitly stated in the rule.
1 change: 1 addition & 0 deletions changelog/7477.enhancement.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add minimum compatible version to --version command
Loading

0 comments on commit b9705f4

Please sign in to comment.