Skip to content

Commit

Permalink
Feat/enable lint GitHub actions (#525)
Browse files Browse the repository at this point in the history
* feat/Add github action for testing purpose

* fix/fixed wrong path on github action

* fix/added packages to launch tests

* fix/added secret keys at the repo as environment variables

* test(contentful): schedule tests to work on machine with any timezone


* fix/ fixed timezone test error

* test(dynamodb): get credentials also from env vars

* feat/Added AWS secret keys as variable environment


* test/dummy changes to verify github actions launch

* feat/Added github action for botonic core

* test/delete cache step for botonic-core

* test/added cache step for botonic-core

* feat/Add github action for testing purpose

* fix/fixed wrong path on github action

* fix/added packages to launch tests

* fix/added secret keys at the repo as environment variables

* test(contentful): schedule tests to work on machine with any timezone

* fix/ fixed timezone test error

* test(dynamodb): get credentials also from env vars

* feat/Added AWS secret keys as variable environment

* test/testing jobs organization

* test/dummy changes to verify github actions launch

* feat/Added build verification

* feat/Added github action for botonic core

* test/added cache step for botonic-core

* feat/add lint verification to botonic-core github action

* feat/solved lint errors

* feat/Added eslint set up and solved eslint errors

* test/check lint test

* fix/ fixed erroneos command

* feat/ Added github actionsto verify lint on all botonic packages

* test/disable cache for testing purpose

* fix/ update directory to install common dependencies

* fix/ fixed two eslint errors

* fix/added environment variable to botonic cli install step to avoid sending info to mixpanel

* fix/fixed lint error due to a  wrong caracter from conflict resolution

Co-authored-by: Daniel Pinyol <[email protected]>
  • Loading branch information
MarcosCA and dpinol authored Feb 10, 2020
1 parent bce9eda commit 84ff1fb
Show file tree
Hide file tree
Showing 75 changed files with 19,350 additions and 385 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/botonic-cli-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Botonic cli tests

on: [push]

jobs:
botonic-cli-tests:
name: Botonic cli tests
runs-on: ubuntu-latest
steps:
- name: Checking out to current branch (Step 1 of 7)
uses: actions/checkout@v1
- name: Setting up node (Step 2 of 7)
uses: actions/setup-node@v1
with:
node-version: '12'
- name: Setting up cache (Step 3 of 7)
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install botonic-cli (Step 4 of 7)
env:
BOTONIC_DISABLE_MIXPANEL: 1
run: (cd ./packages/botonic-cli && npm install -D)
- name: Build botonic-cli (Step 5 of 7)
run: (cd ./packages/botonic-cli && npm run build)
- name: Install common packages dependencies (Step 6 of 7)
run: npm install -D
- name: Verify lint botonic-cli (Step 7 of 7)
run: (cd ./packages/botonic-cli && npm run lint_ci)
18 changes: 10 additions & 8 deletions .github/workflows/botonic-core.tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,28 @@ name: Botonic core tests
on: [push]

jobs:
botonic_react_tests:
botonic-core-tests:
name: Botonic core tests
runs-on: ubuntu-latest
steps:
- name: Checking out to current branch (Step 1 of 6)
- name: Checking out to current branch (Step 1 of 7)
uses: actions/checkout@v1
- name: Setting up node (Step 2 of 6)
- name: Setting up node (Step 2 of 7)
uses: actions/setup-node@v1
with:
node-version: '12'
- name: Setting up cache (Step 3 of 6)
- name: Setting up cache (Step 3 of 7)
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install botonic-core (Step 4 of 6)
run: (cd ./packages/botonic-core && npm install)
- name: Build botonic-core (Step 5 of 6)
- name: Install botonic-core (Step 4 of 7)
run: (cd ./packages/botonic-core && npm install -D)
- name: Build botonic-core (Step 5 of 7)
run: (cd ./packages/botonic-core && npm run build)
- name: Run tests botonic-core (Step 6 of 6)
- name: Run tests botonic-core (Step 6 of 7)
run: (cd ./packages/botonic-core && npm run test)
- name: Verify lint botonic-core (Step 7 of 7)
run: (cd ./packages/botonic-core && npm run lint_ci)
30 changes: 30 additions & 0 deletions .github/workflows/botonic-nlu-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Botonic nlu tests

on: [push]

jobs:
botonic-plugin-nlu-tests:
name: Botonic nlu tests
runs-on: ubuntu-latest
steps:
- name: Checking out to current branch (Step 1 of 7)
uses: actions/checkout@v1
- name: Setting up node (Step 2 of 7)
uses: actions/setup-node@v1
with:
node-version: '12'
- name: Setting up cache (Step 3 of 7)
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install botonic-nlu (Step 4 of 7)
run: (cd ./packages/botonic-nlu && npm install -D)
- name: Build botonic-nlu (Step 5 of 7)
run: (cd ./packages/botonic-nlu && npm run build)
- name: Install common packages dependencies (Step 6 of 7)
run: npm install -D
- name: Verify lint botonic-nlu (Step 7 of 7)
run: (cd ./packages/botonic-nlu && npm run lint_ci)
24 changes: 13 additions & 11 deletions .github/workflows/botonic-plugin-contentful-tests.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,33 @@
name: Botonic plugin contentful tests
name: Botonic plugin-contentful tests

on: [push]

jobs:
botonic-plugin-contentful:
name: Botonic plugin contentful Tests
botonic-plugin-contentful-tests:
name: Botonic plugin-contentful Tests
runs-on: ubuntu-latest
steps:
- name: Checking out to current branch (Step 1 of 6)
- name: Checking out to current branch (Step 1 of 7)
uses: actions/checkout@v1
- name: Setting up node (Step 2 of 6)
- name: Setting up node (Step 2 of 7)
uses: actions/setup-node@v1
with:
node-version: '12'
- name: Setting up cache (Step 3 of 6)
- name: Setting up cache (Step 3 of 7)
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install botonic-plugin-contentful (Step 4 of 6)
run: (cd ./packages/botonic-plugin-contentful && npm install)
- name: Build botonic-plugin-contentful (Step 5 of 6)
- name: Install botonic-plugin-contentful (Step 4 of 7)
run: (cd ./packages/botonic-plugin-contentful && npm install -D)
- name: Build botonic-plugin-contentful (Step 5 of 7)
run: (cd ./packages/botonic-plugin-contentful && npm run build)
- name: Run tests botonic-plugin-contentful (Step 6 of 6)
- name: Run tests botonic-plugin-contentful (Step 6 of 7)
env:
CONTENTFUL_TEST_SPACE_ID: ${{ secrets.CONTENTFUL_TEST_SPACE_ID }}
CONTENTFUL_TEST_TOKEN: ${{ secrets.CONTENTFUL_TEST_TOKEN }}
run: (cd ./packages/botonic-plugin-contentful && npm run test)
run: (cd ./packages/botonic-plugin-contentful && npm run test)
- name: Verify lint botonic-plugin-contentful (Step 7 of 7)
run: (cd ./packages/botonic-plugin-contentful && npm run lint_ci)
28 changes: 28 additions & 0 deletions .github/workflows/botonic-plugin-dashbot-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Botonic plugin-dashbot tests

on: [push]

jobs:
botonic-plugin-dashbot-tests:
name: Botonic plugin-dashbot tests
runs-on: ubuntu-latest
steps:
- name: Checking out to current branch (Step 1 of 6)
uses: actions/checkout@v1
- name: Setting up node (Step 2 of 6)
uses: actions/setup-node@v1
with:
node-version: '12'
- name: Setting up cache (Step 3 of 6)
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install botonic-plugin-dashbot (Step 4 of 6)
run: (cd ./packages/botonic-plugin-dashbot && npm install -D)
- name: Install common packages dependencies (Step 5 of 6)
run: npm install -D
- name: Verify lint botonic-plugin-dashbot (Step 6 of 6)
run: (cd ./packages/botonic-plugin-dashbot && npm run lint_ci)
28 changes: 28 additions & 0 deletions .github/workflows/botonic-plugin-dialogflow-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Botonic plugin-dialogflow tests

on: [push]

jobs:
botonic-plugin-dialogflow-tests:
name: Botonic plugin-dialogflow tests
runs-on: ubuntu-latest
steps:
- name: Checking out to current branch (Step 1 of 6)
uses: actions/checkout@v1
- name: Setting up node (Step 2 of 6)
uses: actions/setup-node@v1
with:
node-version: '12'
- name: Setting up cache (Step 3 of 6)
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install botonic-plugin-dialogflow (Step 4 of 6)
run: (cd ./packages/botonic-plugin-dialogflow && npm install -D)
- name: Install common packages dependencies (Step 5 of 6)
run: npm install -D
- name: Verify lint botonic-plugin-dialogflow (Step 6 of 6)
run: (cd ./packages/botonic-plugin-dialogflow && npm run lint_ci)
6 changes: 3 additions & 3 deletions .github/workflows/botonic-plugin-dynamo-tests.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Botonic plugin dynamo tests
name: Botonic plugin-dynamodb tests

on: [push]

jobs:
botonic-plugin-dynamodb:
name: Botonic plugin dynamodb Tests
botonic-plugin-dynamodb-tests:
name: Botonic plugin-dynamodb Tests
runs-on: ubuntu-latest
steps:
- name: Checking out to current branch (Step 1 of 6)
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/botonic-plugin-luis-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Botonic plugin-luis tests

on: [push]

jobs:
botonic-plugin-luis-tests:
name: Botonic plugin-luis tests
runs-on: ubuntu-latest
steps:
- name: Checking out to current branch (Step 1 of 6)
uses: actions/checkout@v1
- name: Setting up node (Step 2 of 6)
uses: actions/setup-node@v1
with:
node-version: '12'
- name: Setting up cache (Step 3 of 6)
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install botonic-plugin-luis (Step 4 of 6)
run: (cd ./packages/botonic-plugin-luis && npm install -D)
- name: Install common packages dependencies (Step 5 of 6)
run: npm install -D
- name: Verify lint botonic-plugin-luis (Step 6 of 6)
run: (cd ./packages/botonic-plugin-luis && npm run lint_ci)
30 changes: 30 additions & 0 deletions .github/workflows/botonic-plugin-nlu-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Botonic plugin-nlu tests

on: [push]

jobs:
botonic-plugin-nlu-tests:
name: Botonic plugin-nlu tests
runs-on: ubuntu-latest
steps:
- name: Checking out to current branch (Step 1 of 7)
uses: actions/checkout@v1
- name: Setting up node (Step 2 of 7)
uses: actions/setup-node@v1
with:
node-version: '12'
- name: Setting up cache (Step 3 of 7)
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install botonic-plugin-nlu (Step 4 of 7)
run: (cd ./packages/botonic-plugin-nlu && npm install -D)
- name: Build botonic-plugin-nlu (Step 5 of 7)
run: (cd ./packages/botonic-plugin-nlu && npm run build)
- name: Install common packages dependencies (Step 6 of 7)
run: npm install -D
- name: Verify lint botonic-plugin-nlu (Step 6 of 7)
run: (cd ./packages/botonic-plugin-nlu && npm run lint_ci)
28 changes: 28 additions & 0 deletions .github/workflows/botonic-plugin-segment-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Botonic plugin-segment tests

on: [push]

jobs:
botonic-plugin-segment-tests:
name: Botonic plugin-segment tests
runs-on: ubuntu-latest
steps:
- name: Checking out to current branch (Step 1 of 6)
uses: actions/checkout@v1
- name: Setting up node (Step 2 of 6)
uses: actions/setup-node@v1
with:
node-version: '12'
- name: Setting up cache (Step 3 of 6)
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install botonic-plugin-segment (Step 4 of 6)
run: (cd ./packages/botonic-plugin-segment && npm install -D)
- name: Install common packages dependencies (Step 5 of 6)
run: npm install -D
- name: Verify lint botonic-plugin-segment (Step 6 of 6)
run: (cd ./packages/botonic-plugin-segment && npm run lint_ci)
28 changes: 28 additions & 0 deletions .github/workflows/botonic-plugin-watson-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Botonic plugin-watson tests

on: [push]

jobs:
botonic-plugin-watson-tests:
name: Botonic plugin-watson tests
runs-on: ubuntu-latest
steps:
- name: Checking out to current branch (Step 1 of 6)
uses: actions/checkout@v1
- name: Setting up node (Step 2 of 6)
uses: actions/setup-node@v1
with:
node-version: '12'
- name: Setting up cache (Step 3 of 6)
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install botonic-plugin-watson (Step 4 of 6)
run: (cd ./packages/botonic-plugin-watson && npm install -D)
- name: Install common packages dependencies (Step 5 of 6)
run: npm install -D
- name: Verify lint botonic-plugin-watson (Step 6 of 6)
run: (cd ./packages/botonic-plugin-watson && npm run lint_ci)
20 changes: 12 additions & 8 deletions .github/workflows/botonic-react-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,30 @@ name: Botonic react tests
on: [push]

jobs:
botonic_react_tests:
botonic-react-tests:
name: Botonic react tests
runs-on: ubuntu-latest
steps:
- name: Checking out to current branch (Step 1 of 6)
- name: Checking out to current branch (Step 1 of 8)
uses: actions/checkout@v1
- name: Setting up node (Step 2 of 6)
- name: Setting up node (Step 2 of 8)
uses: actions/setup-node@v1
with:
node-version: '12'
- name: Setting up cache (Step 3 of 6)
- name: Setting up cache (Step 3 of 8)
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install botonic-react (Step 4 of 6)
run: (cd ./packages/botonic-react && npm install)
- name: Build botonic-react (Step 5 of 6)
- name: Install botonic-react (Step 4 of 8)
run: (cd ./packages/botonic-react && npm install -D)
- name: Build botonic-react (Step 5 of 8)
run: (cd ./packages/botonic-react && npm run build)
- name: Run tests botonic-react (Step 6 of 6)
- name: Run tests botonic-react (Step 6 of 8)
run: (cd ./packages/botonic-react && npm run test)
- name: Install common packages dependencies (Step 7 of 8)
run: npm install -D
- name: Verify lint botonic-react (Step 8 of 8)
run: (cd ./packages/botonic-react && npm run lint_ci)
Loading

0 comments on commit 84ff1fb

Please sign in to comment.