From b38c038f4da2515a8ca770221b61bc9423e3dd81 Mon Sep 17 00:00:00 2001 From: Karine Dery <karine.dery@nuecho.com> Date: Tue, 25 Aug 2020 14:21:23 -0400 Subject: [PATCH 01/15] chore: add basic github pipeline (#12) --- .github/workflows/check.yml | 51 +++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/check.yml diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml new file mode 100644 index 00000000..52f38525 --- /dev/null +++ b/.github/workflows/check.yml @@ -0,0 +1,51 @@ +# This workflow will install Python dependencies, run tests and lint with a single version of Python + +name: Python Checks + +on: + push: + branches: + - master + pull_request: + +jobs: + check: + runs-on: ubuntu-latest + env: + core: ./core + action-server: ./action-server + + steps: + - uses: actions/checkout@v2 + - name: Set up Python 3.6.8 + uses: actions/setup-python@v2 + with: + python-version: 3.6.8 + - name: Installing poetry + run: | + export $( \ + PYTHONFAULTHANDLER=TRUE \ + PYTHONUNBUFFERED=TRUE \ + PIP_DISABLE_PIP_VERSION_CHECK=on \ + PIP_NO_CACHE_DIR=off \ + ) + pip install --upgrade pip \ + && pip install "poetry==1.0.5" + - name: Installing core dependencies + run: make install + working-directory: ${{env.core}} + - name: Linting core + run: make lint + working-directory: ${{env.core}} + - name: Unit testing core + run: make test + working-directory: ${{env.core}} + - name: Installing action-server dependencies + run: make install + working-directory: ${{env.action-server}} + - name: Linting action-server + run: make lint + working-directory: ${{env.action-server}} + - name: Unit testing action-server + run: make test + working-directory: ${{env.action-server}} From d85cb8bee3c852b6ee3186fa6fb90889046a5371 Mon Sep 17 00:00:00 2001 From: Karine Dery <karine.dery@nuecho.com> Date: Tue, 25 Aug 2020 15:15:56 -0400 Subject: [PATCH 02/15] split in three jobs --- .github/workflows/check.yml | 42 ++++++++++++++++++++++--------------- core/tests/__init__.py | 0 core/tests/test_nothing.py | 6 ++++++ 3 files changed, 31 insertions(+), 17 deletions(-) create mode 100644 core/tests/__init__.py create mode 100644 core/tests/test_nothing.py diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 52f38525..52f6d32e 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -9,12 +9,8 @@ on: pull_request: jobs: - check: + setup: runs-on: ubuntu-latest - env: - core: ./core - action-server: ./action-server - steps: - uses: actions/checkout@v2 - name: Set up Python 3.6.8 @@ -31,21 +27,33 @@ jobs: ) pip install --upgrade pip \ && pip install "poetry==1.0.5" - - name: Installing core dependencies + check-core: + runs-on: ubuntu-latest + needs: setup + env: + working-directory: ./core + steps: + - name: Installing dependencies run: make install - working-directory: ${{env.core}} - - name: Linting core + working-directory: ${{env.working-directory}} + - name: Linting run: make lint - working-directory: ${{env.core}} - - name: Unit testing core + working-directory: ${{env.working-directory}} + - name: Unit testing run: make test - working-directory: ${{env.core}} - - name: Installing action-server dependencies + working-directory: ${{env.working-directory}} + check-action-server: + runs-on: ubuntu-latest + needs: setup + env: + working-directory: ./action-server + steps: + - name: Installing dependencies run: make install - working-directory: ${{env.action-server}} - - name: Linting action-server + working-directory: ${{env.working-directory}} + - name: Linting run: make lint - working-directory: ${{env.action-server}} - - name: Unit testing action-server + working-directory: ${{env.working-directory}} + - name: Unit testing run: make test - working-directory: ${{env.action-server}} + working-directory: ${{env.working-directory}} diff --git a/core/tests/__init__.py b/core/tests/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/core/tests/test_nothing.py b/core/tests/test_nothing.py new file mode 100644 index 00000000..b7c90a39 --- /dev/null +++ b/core/tests/test_nothing.py @@ -0,0 +1,6 @@ +from unittest import TestCase + + +class NothingTest(TestCase): + def test_missing_environment_key(self): + self.assertTrue(True) From b620daf761b3f70dbc94f44011013ba682c912f5 Mon Sep 17 00:00:00 2001 From: Karine Dery <karine.dery@nuecho.com> Date: Tue, 25 Aug 2020 15:29:52 -0400 Subject: [PATCH 03/15] trying something... --- .github/workflows/check.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 52f6d32e..be2317ba 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -30,18 +30,16 @@ jobs: check-core: runs-on: ubuntu-latest needs: setup - env: - working-directory: ./core steps: - name: Installing dependencies run: make install - working-directory: ${{env.working-directory}} + working-directory: ./core - name: Linting run: make lint - working-directory: ${{env.working-directory}} + working-directory: ./core - name: Unit testing run: make test - working-directory: ${{env.working-directory}} + working-directory: ./core check-action-server: runs-on: ubuntu-latest needs: setup From 596e697b172cc79ca234e0cf164ed35ad7f4339d Mon Sep 17 00:00:00 2001 From: Karine Dery <karine.dery@nuecho.com> Date: Tue, 25 Aug 2020 15:32:06 -0400 Subject: [PATCH 04/15] trying something else --- .github/workflows/check.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index be2317ba..81d06cf8 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -30,16 +30,19 @@ jobs: check-core: runs-on: ubuntu-latest needs: setup + env: + working-directory: ./core steps: + - uses: actions/checkout@v2 - name: Installing dependencies run: make install - working-directory: ./core + working-directory: ${{env.working-directory}} - name: Linting run: make lint - working-directory: ./core + working-directory: ${{env.working-directory}} - name: Unit testing run: make test - working-directory: ./core + working-directory: ${{env.working-directory}} check-action-server: runs-on: ubuntu-latest needs: setup From 82c89aa661c83292f3e746385f509e385abf7b33 Mon Sep 17 00:00:00 2001 From: Karine Dery <karine.dery@nuecho.com> Date: Tue, 25 Aug 2020 15:36:03 -0400 Subject: [PATCH 05/15] split in two jobs instead --- .github/workflows/check.yml | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 81d06cf8..a121ce22 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -9,8 +9,10 @@ on: pull_request: jobs: - setup: + check-core: runs-on: ubuntu-latest + env: + working-directory: ./core steps: - uses: actions/checkout@v2 - name: Set up Python 3.6.8 @@ -27,13 +29,6 @@ jobs: ) pip install --upgrade pip \ && pip install "poetry==1.0.5" - check-core: - runs-on: ubuntu-latest - needs: setup - env: - working-directory: ./core - steps: - - uses: actions/checkout@v2 - name: Installing dependencies run: make install working-directory: ${{env.working-directory}} @@ -45,10 +40,24 @@ jobs: working-directory: ${{env.working-directory}} check-action-server: runs-on: ubuntu-latest - needs: setup env: working-directory: ./action-server steps: + - uses: actions/checkout@v2 + - name: Set up Python 3.6.8 + uses: actions/setup-python@v2 + with: + python-version: 3.6.8 + - name: Installing poetry + run: | + export $( \ + PYTHONFAULTHANDLER=TRUE \ + PYTHONUNBUFFERED=TRUE \ + PIP_DISABLE_PIP_VERSION_CHECK=on \ + PIP_NO_CACHE_DIR=off \ + ) + pip install --upgrade pip \ + && pip install "poetry==1.0.5" - name: Installing dependencies run: make install working-directory: ${{env.working-directory}} From 58fae41a515c73175f54c379598707b7ccd065f6 Mon Sep 17 00:00:00 2001 From: Karine Dery <karine.dery@nuecho.com> Date: Tue, 25 Aug 2020 15:45:07 -0400 Subject: [PATCH 06/15] updating comment --- .github/workflows/check.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index a121ce22..c1c1eb9c 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -1,4 +1,4 @@ -# This workflow will install Python dependencies, run tests and lint with a single version of Python +# This workflow will install Python dependencies, run tests and lint both for the action server and core name: Python Checks @@ -38,6 +38,7 @@ jobs: - name: Unit testing run: make test working-directory: ${{env.working-directory}} + check-action-server: runs-on: ubuntu-latest env: From b8f75e0b4580ddbbc56c54fe52f3fc8b6c37c755 Mon Sep 17 00:00:00 2001 From: Karine Dery <karine.dery@nuecho.com> Date: Wed, 26 Aug 2020 08:46:26 -0400 Subject: [PATCH 07/15] trying composite actions --- .github/workflows/check.yml | 70 ----------------------- .github/workflows/checks.yml | 40 +++++++++++++ .github/workflows/python/setup/action.yml | 17 ++++++ 3 files changed, 57 insertions(+), 70 deletions(-) delete mode 100644 .github/workflows/check.yml create mode 100644 .github/workflows/checks.yml create mode 100644 .github/workflows/python/setup/action.yml diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml deleted file mode 100644 index c1c1eb9c..00000000 --- a/.github/workflows/check.yml +++ /dev/null @@ -1,70 +0,0 @@ -# This workflow will install Python dependencies, run tests and lint both for the action server and core - -name: Python Checks - -on: - push: - branches: - - master - pull_request: - -jobs: - check-core: - runs-on: ubuntu-latest - env: - working-directory: ./core - steps: - - uses: actions/checkout@v2 - - name: Set up Python 3.6.8 - uses: actions/setup-python@v2 - with: - python-version: 3.6.8 - - name: Installing poetry - run: | - export $( \ - PYTHONFAULTHANDLER=TRUE \ - PYTHONUNBUFFERED=TRUE \ - PIP_DISABLE_PIP_VERSION_CHECK=on \ - PIP_NO_CACHE_DIR=off \ - ) - pip install --upgrade pip \ - && pip install "poetry==1.0.5" - - name: Installing dependencies - run: make install - working-directory: ${{env.working-directory}} - - name: Linting - run: make lint - working-directory: ${{env.working-directory}} - - name: Unit testing - run: make test - working-directory: ${{env.working-directory}} - - check-action-server: - runs-on: ubuntu-latest - env: - working-directory: ./action-server - steps: - - uses: actions/checkout@v2 - - name: Set up Python 3.6.8 - uses: actions/setup-python@v2 - with: - python-version: 3.6.8 - - name: Installing poetry - run: | - export $( \ - PYTHONFAULTHANDLER=TRUE \ - PYTHONUNBUFFERED=TRUE \ - PIP_DISABLE_PIP_VERSION_CHECK=on \ - PIP_NO_CACHE_DIR=off \ - ) - pip install --upgrade pip \ - && pip install "poetry==1.0.5" - - name: Installing dependencies - run: make install - working-directory: ${{env.working-directory}} - - name: Linting - run: make lint - working-directory: ${{env.working-directory}} - - name: Unit testing - run: make test - working-directory: ${{env.working-directory}} diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml new file mode 100644 index 00000000..738e829d --- /dev/null +++ b/.github/workflows/checks.yml @@ -0,0 +1,40 @@ +# This workflow will install Python dependencies, run tests and lint both for the action server and core + +name: Python Checks + +on: + push: + branches: + - master + pull_request: + +jobs: + check-core: + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./core + steps: + - uses: actions/checkout@v2 + - uses: python/setup@v1 + - name: Installing dependencies + run: make install + - name: Linting + run: make lint + - name: Unit testing + run: make test + + check-action-server: + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./action-server + steps: + - uses: actions/checkout@v2 + - uses: python/setup@v1 + - name: Installing dependencies + run: make install + - name: Linting + run: make lint + - name: Unit testing + run: make test diff --git a/.github/workflows/python/setup/action.yml b/.github/workflows/python/setup/action.yml new file mode 100644 index 00000000..52288889 --- /dev/null +++ b/.github/workflows/python/setup/action.yml @@ -0,0 +1,17 @@ +runs: + using: "composite" + steps: + - name: Set up Python 3.6.8 + uses: actions/setup-python@v2 + with: + python-version: 3.6.8 + - name: Installing poetry + run: | + export $( \ + PYTHONFAULTHANDLER=TRUE \ + PYTHONUNBUFFERED=TRUE \ + PIP_DISABLE_PIP_VERSION_CHECK=on \ + PIP_NO_CACHE_DIR=off \ + ) + pip install --upgrade pip \ + && pip install "poetry==1.0.5" From 6efb07ba9c1caf1587f0e00d02bc7298b4658941 Mon Sep 17 00:00:00 2001 From: Karine Dery <karine.dery@nuecho.com> Date: Wed, 26 Aug 2020 08:53:32 -0400 Subject: [PATCH 08/15] composite run steps test 2 --- .../{python/setup/action.yml => actions/python-setup.yml} | 0 .github/workflows/checks.yml | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) rename .github/workflows/{python/setup/action.yml => actions/python-setup.yml} (100%) diff --git a/.github/workflows/python/setup/action.yml b/.github/workflows/actions/python-setup.yml similarity index 100% rename from .github/workflows/python/setup/action.yml rename to .github/workflows/actions/python-setup.yml diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 738e829d..7b9edd8a 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -16,7 +16,7 @@ jobs: working-directory: ./core steps: - uses: actions/checkout@v2 - - uses: python/setup@v1 + - uses: ./.github/actions/python-setup - name: Installing dependencies run: make install - name: Linting @@ -31,7 +31,7 @@ jobs: working-directory: ./action-server steps: - uses: actions/checkout@v2 - - uses: python/setup@v1 + - uses: ./.github/actions/python-setup - name: Installing dependencies run: make install - name: Linting From 23f1a09bd76242ff73a9f3d2f1e2b7ef3e372873 Mon Sep 17 00:00:00 2001 From: Karine Dery <karine.dery@nuecho.com> Date: Wed, 26 Aug 2020 08:55:50 -0400 Subject: [PATCH 09/15] test 3 --- .../actions/{python-setup.yml => python-setup/action.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/actions/{python-setup.yml => python-setup/action.yml} (100%) diff --git a/.github/workflows/actions/python-setup.yml b/.github/workflows/actions/python-setup/action.yml similarity index 100% rename from .github/workflows/actions/python-setup.yml rename to .github/workflows/actions/python-setup/action.yml From 9ff22cfd1f2e3bbe84e73073101d5f5da4faa174 Mon Sep 17 00:00:00 2001 From: Karine Dery <karine.dery@nuecho.com> Date: Wed, 26 Aug 2020 08:57:33 -0400 Subject: [PATCH 10/15] test 4 --- .github/{workflows => }/actions/python-setup/action.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/{workflows => }/actions/python-setup/action.yml (100%) diff --git a/.github/workflows/actions/python-setup/action.yml b/.github/actions/python-setup/action.yml similarity index 100% rename from .github/workflows/actions/python-setup/action.yml rename to .github/actions/python-setup/action.yml From b88990fc593915dbebefb2d1866af17468ae0c3e Mon Sep 17 00:00:00 2001 From: Karine Dery <karine.dery@nuecho.com> Date: Wed, 26 Aug 2020 09:13:12 -0400 Subject: [PATCH 11/15] test 5 --- .../{python-setup => checks}/action.yml | 14 +++++++---- .github/workflows/checks.yml | 24 ++++++++----------- 2 files changed, 20 insertions(+), 18 deletions(-) rename .github/actions/{python-setup => checks}/action.yml (60%) diff --git a/.github/actions/python-setup/action.yml b/.github/actions/checks/action.yml similarity index 60% rename from .github/actions/python-setup/action.yml rename to .github/actions/checks/action.yml index 52288889..dc960ba7 100644 --- a/.github/actions/python-setup/action.yml +++ b/.github/actions/checks/action.yml @@ -1,11 +1,8 @@ runs: using: "composite" steps: - - name: Set up Python 3.6.8 - uses: actions/setup-python@v2 - with: - python-version: 3.6.8 - name: Installing poetry + shell: bash run: | export $( \ PYTHONFAULTHANDLER=TRUE \ @@ -15,3 +12,12 @@ runs: ) pip install --upgrade pip \ && pip install "poetry==1.0.5" + - name: Installing dependencies + shell: bash + run: make install + - name: Linting + shell: bash + run: make lint + - name: Unit testing + shell: bash + run: make test diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 7b9edd8a..7d5a1ede 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -16,13 +16,11 @@ jobs: working-directory: ./core steps: - uses: actions/checkout@v2 - - uses: ./.github/actions/python-setup - - name: Installing dependencies - run: make install - - name: Linting - run: make lint - - name: Unit testing - run: make test + - name: Set up Python 3.6.8 + uses: actions/setup-python@v2 + with: + python-version: 3.6.8 + - uses: ./.github/actions/checks check-action-server: runs-on: ubuntu-latest @@ -31,10 +29,8 @@ jobs: working-directory: ./action-server steps: - uses: actions/checkout@v2 - - uses: ./.github/actions/python-setup - - name: Installing dependencies - run: make install - - name: Linting - run: make lint - - name: Unit testing - run: make test + - name: Set up Python 3.6.8 + uses: actions/setup-python@v2 + with: + python-version: 3.6.8 + - uses: ./.github/actions/checks From 88b00fac193a335bfb8b1234b3335118e32aaf1e Mon Sep 17 00:00:00 2001 From: Karine Dery <karine.dery@nuecho.com> Date: Wed, 26 Aug 2020 09:35:08 -0400 Subject: [PATCH 12/15] test 6 --- .github/actions/checks/action.yml | 10 ---------- .github/workflows/checks.yml | 12 ++++++++++++ 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/.github/actions/checks/action.yml b/.github/actions/checks/action.yml index dc960ba7..43de5126 100644 --- a/.github/actions/checks/action.yml +++ b/.github/actions/checks/action.yml @@ -2,7 +2,6 @@ runs: using: "composite" steps: - name: Installing poetry - shell: bash run: | export $( \ PYTHONFAULTHANDLER=TRUE \ @@ -12,12 +11,3 @@ runs: ) pip install --upgrade pip \ && pip install "poetry==1.0.5" - - name: Installing dependencies - shell: bash - run: make install - - name: Linting - shell: bash - run: make lint - - name: Unit testing - shell: bash - run: make test diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 7d5a1ede..24dd6c86 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -21,6 +21,12 @@ jobs: with: python-version: 3.6.8 - uses: ./.github/actions/checks + - name: Installing dependencies + run: make install + - name: Linting + run: make lint + - name: Unit testing + run: make test check-action-server: runs-on: ubuntu-latest @@ -34,3 +40,9 @@ jobs: with: python-version: 3.6.8 - uses: ./.github/actions/checks + - name: Installing dependencies + run: make install + - name: Linting + run: make lint + - name: Unit testing + run: make test From 86f9941d4e38e51067dcefbf0fb075b7c9db9b1c Mon Sep 17 00:00:00 2001 From: Karine Dery <karine.dery@nuecho.com> Date: Wed, 26 Aug 2020 09:37:00 -0400 Subject: [PATCH 13/15] test 7 --- .github/actions/checks/action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/actions/checks/action.yml b/.github/actions/checks/action.yml index 43de5126..251b87ec 100644 --- a/.github/actions/checks/action.yml +++ b/.github/actions/checks/action.yml @@ -11,3 +11,4 @@ runs: ) pip install --upgrade pip \ && pip install "poetry==1.0.5" + shell: bash From f0c1304a65a61dedea489784e1778221a28e3e35 Mon Sep 17 00:00:00 2001 From: Karine Dery <karine.dery@nuecho.com> Date: Wed, 26 Aug 2020 09:41:44 -0400 Subject: [PATCH 14/15] review comments applied --- .circleci/config.yml | 365 ------------------ .../{checks => setup-poetry}/action.yml | 0 .github/workflows/checks.yml | 4 +- 3 files changed, 2 insertions(+), 367 deletions(-) delete mode 100644 .circleci/config.yml rename .github/actions/{checks => setup-poetry}/action.yml (100%) diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 2e4c6c82..00000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,365 +0,0 @@ -version: 2.1 - -orbs: - app: dialogue/helm-app@2 - base: dialogue/base@1 - job: dialogue/helm-job@2 - python: dialogue/python@2 - release: dialogue/release@2 - -executors: - large-python-executor: - docker: - - image: circleci/python:3.7 - resource_class: large - -workflows: - cicd: - jobs: - - mypy: - name: (AS) mypy - working_directory: action-server - context: org-global-v2 - - python/pylama: - name: (AS) pylama - working_directory: action-server - context: org-global-v2 - - python/isort: - name: (AS) isort - working_directory: action-server - context: org-global-v2 - - python/black: - name: (AS) black - working_directory: action-server - context: org-global-v2 - - python/test: - name: (AS) test - working_directory: action-server - codecov_flag: action_server - context: org-global-v2 - - app/build: - name: (AS) build - component: action-server - context: org-global-v2 - - - mypy: - name: (core) mypy - working_directory: core - context: org-global-v2 - - python/pylama: - name: (core) pylama - working_directory: core - context: org-global-v2 - - python/isort: - name: (core) isort - working_directory: core - context: org-global-v2 - - python/black: - name: (core) black - working_directory: core - context: org-global-v2 - - validate_domain: - name: (core) validate_domain - working_directory: core - context: org-global-v2 - - - prepare_core_build: - name: (core-en) Prepare build - context: org-global-v2 - language: en - - app/build: - name: (core-en) build - component: core-en - context: org-global-v2 - before_build_steps: - - attach_workspace: - at: ~/project/ - requires: - - (core-en) Prepare build - - - prepare_core_build: - name: (core-fr) Prepare build - context: org-global-v2 - language: fr - - app/build: - name: (core-fr) build - component: core-fr - context: org-global-v2 - before_build_steps: - - attach_workspace: - at: ~/project/ - requires: - - (core-fr) Prepare build - - - release/release: - name: release - context: org-global-v2 - requires: - - (AS) mypy - - (AS) pylama - - (AS) isort - - (AS) black - - (AS) test - - (AS) build - - (core) mypy - - (core) pylama - - (core) isort - - (core) black - - (core) validate_domain - - (core-en) build - - (core-fr) build - - # dev deployments - - app/deploy: - name: deploy-dev-ca2-ephemeral - stage: dev - place: ca2 - ephemeral: yes - requires: - - (AS) mypy - - (AS) pylama - - (AS) isort - - (AS) black - - (AS) test - - (AS) build - - (core) mypy - - (core) pylama - - (core) isort - - (core) black - - (core) validate_domain - - (core-en) build - - (core-fr) build - context: org-global-v2 - filters: - branches: - ignore: master - - job/deploy: - name: deploy-job-dev-ca2-ephemeral - stage: dev - place: ca2 - wait: false - requires: - - deploy-dev-ca2-ephemeral - context: org-global-v2 - filters: - branches: - ignore: master - - app/clean_ephemeral_deploy: - name: clean-dev-ca2-ephemeral-deploy - stage: dev - place: ca2 - filters: - branches: - only: master - context: org-global-v2 - - - app/test_system: - name: dev-integration-tests-en - stage: dev - place: ca2 - component: core-en - working_directory: core - requires: - - deploy-dev-ca2-ephemeral - context: org-global-v2 - filters: - branches: - ignore: master - steps: - - run-integration-tests: - language: en - - app/test_system: - name: dev-integration-tests-fr - stage: dev - place: ca2 - component: core-fr - working_directory: core - requires: - - deploy-dev-ca2-ephemeral - context: org-global-v2 - filters: - branches: - ignore: master - steps: - - run-integration-tests: - language: fr - - # master deployments - - app/deploy: - name: deploy-dev-ca2 - stage: dev - place: ca2 - requires: - - (AS) mypy - - (AS) pylama - - (AS) isort - - (AS) black - - (AS) test - - (AS) build - - (core) mypy - - (core) pylama - - (core) isort - - (core) black - - (core) validate_domain - - (core-en) build - - (core-fr) build - context: org-global-v2 - filters: - branches: - only: master - - job/deploy: - name: deploy-job-dev-ca2 - stage: dev - place: ca2 - wait: false - requires: - - deploy-dev-ca2 - context: org-global-v2 - filters: - branches: - only: master - - - app/test_system: - name: master-integration-tests-en - stage: dev - place: ca2 - component: core-en - working_directory: core - requires: - - deploy-dev-ca2 - context: org-global-v2 - filters: - branches: - only: master - steps: - - run-integration-tests: - language: en - - app/test_system: - name: master-integration-tests-fr - stage: dev - place: ca2 - component: core-fr - working_directory: core - requires: - - deploy-dev-ca2 - context: org-global-v2 - filters: - branches: - only: master - steps: - - run-integration-tests: - language: fr - - - app/deploy: - name: deploy-prod-ca - stage: prod - place: ca - requires: - - master-integration-tests-en - - master-integration-tests-fr - context: org-global-v2 - filters: - branches: - only: master - deploy_timeout: 600s - cci_wait_timeout: 615s - - job/deploy: - name: deploy-job-prod-ca - stage: prod - place: ca - wait: false - requires: - - deploy-prod-ca - context: org-global-v2 - filters: - branches: - only: master - -aliases: - - ¶m__language - language: - type: string - description: Specifies which model language to build/use - - ¶m__working_directory - working_directory: - type: string - default: "." - description: Directory to run post-checkout steps - -jobs: - mypy: - description: Checks static typing with mypy - parameters: - <<: *param__working_directory - working_directory: ~/project/<<parameters.working_directory>> - executor: python/python - steps: - - setup-project - - run: - name: Run mypy - command: poetry run mypy . - validate_domain: - description: Validate Rasa domain file - parameters: - <<: *param__working_directory - working_directory: ~/project/<<parameters.working_directory>> - executor: python/python - steps: - - setup-project - - run: - name: Run validate_domain - command: poetry run python scripts/validate_domain.py - prepare_core_build: - description: Prepare core help-app component (rasa-core models and docker assets) - parameters: - <<: *param__language - executor: large-python-executor - environment: - COMPONENT_PATH: /app/core-<<parameters.language>> - working_directory: /app/core - docker: - - image: rasa/rasa:2.0.0a1-full - entrypoint: ["/bin/bash"] - steps: - - checkout: - path: /app - - run: - name: Prepare NLU training files - command: | - mkdir ${COMPONENT_PATH} - cp poetry.lock ${COMPONENT_PATH} - cp pyproject.toml ${COMPONENT_PATH} - cp Dockerfile ${COMPONENT_PATH} - cp credentials.yml ${COMPONENT_PATH} - cp endpoints.yml ${COMPONENT_PATH} - cp -r core ${COMPONENT_PATH} - - run: - name: Train the NLU model - command: | - sh scripts/prepare-training-data.sh <<parameters.language>> - rasa train --augmentation 0 --out ${COMPONENT_PATH}/models - - persist_to_workspace: - root: /app - paths: - - core-<<parameters.language>> -commands: - setup-project: - steps: - - base/setup - - python/setup - - python/install_deps - run-integration-tests: - parameters: - <<: *param__language - steps: - - python/setup - - python/install_deps - - run: - name: Run integration tests - command: | - echo 'export CORE_ENDPOINT_URL=${APP_SCHEME}://${APP_HOST}:${APP_PORT}' >> $BASH_ENV - source $BASH_ENV - poetry run python -m rasa_integration_testing ../integration-tests-<<parameters.language>> - environment: - INTEGRATION_TESTS_REMINDER_ID_PROFILE_1: NLBAvWPZ - INTEGRATION_TESTS_REMINDER_ID_PROFILE_2: qVQGKQKm diff --git a/.github/actions/checks/action.yml b/.github/actions/setup-poetry/action.yml similarity index 100% rename from .github/actions/checks/action.yml rename to .github/actions/setup-poetry/action.yml diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 24dd6c86..d78bfbb3 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -20,7 +20,7 @@ jobs: uses: actions/setup-python@v2 with: python-version: 3.6.8 - - uses: ./.github/actions/checks + - uses: ./.github/actions/setup-poetry - name: Installing dependencies run: make install - name: Linting @@ -39,7 +39,7 @@ jobs: uses: actions/setup-python@v2 with: python-version: 3.6.8 - - uses: ./.github/actions/checks + - uses: ./.github/actions/setup-poetry - name: Installing dependencies run: make install - name: Linting From ae3db5fd54141576e49ccb29e75422449b85739c Mon Sep 17 00:00:00 2001 From: Karine Dery <karine.dery@nuecho.com> Date: Wed, 26 Aug 2020 09:50:41 -0400 Subject: [PATCH 15/15] change nothing test name --- core/tests/test_nothing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/tests/test_nothing.py b/core/tests/test_nothing.py index b7c90a39..5d1b0e42 100644 --- a/core/tests/test_nothing.py +++ b/core/tests/test_nothing.py @@ -2,5 +2,5 @@ class NothingTest(TestCase): - def test_missing_environment_key(self): + def test_nothing(self): self.assertTrue(True)