Skip to content

Commit 995bbc2

Browse files
committed
chore(plugin): update github actions using monorepo and pre-commit-config
1 parent b58b908 commit 995bbc2

10 files changed

+8883
-11929
lines changed

.github/workflows/botonic-ci-test-all-packages.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Botonic test all packages
1+
name: Botonic CI test all packages
22

33
on:
44
workflow_dispatch:
@@ -49,6 +49,7 @@ jobs:
4949
PACKAGE_NAME: Botonic plugin-dialogflow tests
5050
PACKAGE: botonic-plugin-dialogflow
5151
UNIT_TEST_COMMAND: npm run test_ci
52+
BUILD_COMMAND: 'cd ../botonic-core && npm run build && cd ../botonic-plugin-dialogflow && npm run build'
5253
PUBLISH_TESTS_RESULTS: 'yes'
5354
NEEDS_CODECOV_UPLOAD: 'yes'
5455

@@ -68,7 +69,7 @@ jobs:
6869
with:
6970
PACKAGE_NAME: Botonic plugin-google-analytics tests
7071
PACKAGE: botonic-plugin-google-analytics
71-
BUILD_COMMAND: ''
72+
BUILD_COMMAND: 'cd ../botonic-core && npm run build && cd ../botonic-plugin-google-analytics && npm run build'
7273
UNIT_TEST_COMMAND: ''
7374

7475
botonic-plugin-inbenta-tests:
@@ -113,4 +114,5 @@ jobs:
113114
with:
114115
PACKAGE_NAME: Botonic react tests
115116
PACKAGE: botonic-react
117+
BUILD_COMMAND: 'cd ../botonic-core && npm run build && cd ../botonic-react && npm run build'
116118
NEEDS_CODECOV_UPLOAD: 'yes'

.github/workflows/botonic-common-workflow.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,20 +44,20 @@ on:
4444
required: false
4545

4646
jobs:
47-
bot-tests:
47+
botonic-tests:
4848
name: ${{ inputs.PACKAGE_NAME }} tests
4949
runs-on: ubuntu-latest
5050
steps:
5151
- name: Checking out to current branch
52-
uses: actions/checkout@v3
52+
uses: actions/checkout@v4
5353

5454
- name: Setting up node
55-
uses: actions/setup-node@v3
55+
uses: actions/setup-node@v4
5656
with:
5757
node-version: ${{ inputs.NODE_VERSION }}
5858

5959
- name: Setting up cache
60-
uses: actions/cache@v2
60+
uses: actions/cache@v3
6161
with:
6262
path: ~/.npm
6363
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
@@ -75,8 +75,8 @@ jobs:
7575
role-duration-seconds: 900
7676
role-session-name: HubtypeCITests
7777

78-
- name: Install dev dependencies
79-
run: (cd ./packages/${{ inputs.PACKAGE }} && npm install -D)
78+
- name: Install dependencies
79+
run: npm install
8080

8181
- name: Build
8282
if: ${{ inputs.BUILD_COMMAND != '' }}
@@ -95,7 +95,7 @@ jobs:
9595
CONTENTFUL_TEST_MANAGE_TOKEN: ${{ secrets.CONTENTFUL_TEST_MANAGE_TOKEN }}
9696

9797
- name: Verify lint
98-
run: (cd ./packages/${{ inputs.PACKAGE }} && npm run lint_ci)
98+
run: (cd ./packages/${{ inputs.PACKAGE }} && npm run lint_core)
9999

100100
- name: Publish Unit Test Results
101101
if: ${{ inputs.PUBLISH_TESTS_RESULTS != '' && always() }}

.github/workflows/botonic-plugin-dialogflow-tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ jobs:
1414
with:
1515
PACKAGE_NAME: Botonic plugin-dialogflow tests
1616
PACKAGE: botonic-plugin-dialogflow
17+
BUILD_COMMAND: 'cd ../botonic-core && npm run build && cd ../botonic-plugin-dialogflow && npm run build'
1718
UNIT_TEST_COMMAND: npm run test_ci
1819
PUBLISH_TESTS_RESULTS: 'yes'
1920
NEEDS_CODECOV_UPLOAD: 'yes'

.github/workflows/botonic-plugin-google-analytics-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ jobs:
1414
with:
1515
PACKAGE_NAME: Botonic plugin-google-analytics tests
1616
PACKAGE: botonic-plugin-google-analytics
17-
BUILD_COMMAND: ''
17+
BUILD_COMMAND: 'cd ../botonic-core && npm run build && cd ../botonic-plugin-google-analytics && npm run build'
1818
UNIT_TEST_COMMAND: ''

.github/workflows/botonic-react-tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@ jobs:
1414
with:
1515
PACKAGE_NAME: Botonic react tests
1616
PACKAGE: botonic-react
17+
BUILD_COMMAND: 'cd ../botonic-core && npm run build && cd ../botonic-react && npm run build'
1718
NEEDS_CODECOV_UPLOAD: 'yes'

.pre-commit-config.yaml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,6 @@ repos:
2727
language: system
2828
files: ^packages/botonic-core/
2929

30-
- id: core-d-ts
31-
name: core-d-ts
32-
entry: scripts/qa/old/lint-d-ts.sh packages/botonic-core
33-
language: system
34-
files: ^packages/botonic-core/src/.*\.d\.ts
35-
3630
- id: contentful
3731
name: contentful
3832
entry: scripts/qa/old/lint-package.sh packages/botonic-plugin-contentful
@@ -81,12 +75,6 @@ repos:
8175
language: system
8276
files: ^packages/botonic-react/
8377

84-
- id: react-d-ts
85-
name: react-d-ts
86-
entry: scripts/qa/old/lint-d-ts.sh packages/botonic-react
87-
language: system
88-
files: ^packages/botonic-react/src/.*\.d\.ts
89-
9078
- id: google-analytics
9179
name: google-analytics
9280
entry: scripts/qa/old/lint-package.sh packages/botonic-plugin-google-analytics
@@ -105,12 +93,6 @@ repos:
10593
language: system
10694
files: ^docs/
10795

108-
- id: plugin-intent-classification
109-
name: plugin-intent-classification
110-
entry: scripts/qa/old/lint-package.sh packages/botonic-plugin-intent-classification
111-
language: system
112-
files: ^packages/botonic-plugin-intent-classification/
113-
11496
- id: plugin-flow-builder
11597
name: plugin-flow-builder
11698
entry: scripts/qa/old/lint-package.sh packages/botonic-plugin-flow-builder

0 commit comments

Comments
 (0)