Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(cli): remove force flag, improved error handling and add cli tests #1321

Merged
merged 10 commits into from
Mar 3, 2021

Conversation

vanbasten17
Copy link
Contributor

@vanbasten17 vanbasten17 commented Feb 17, 2021

Description

  • Removed logic to force deploys.
  • Improved error handling.
  • Configured botonic-cli tests.
  • Added some cli tests.

Important
If you have Jest runner set up in VS Code, it will try to run automatically tests for this package. Since the tests try to create temporary directories, it may provoke to create trash files for these tmp directories.
Please, add a .vscode directory in botonic-cli/ with following configuration in order to avoid this behavior:

{
  "jest.runAllTestsFirst": false,
  "jest.autoEnable": false,
  "jest.showCoverageOnLoad": false
}

@vanbasten17 vanbasten17 changed the title chore(cli): remove force deploy logic wip(cli): cli improvements Feb 17, 2021
@vanbasten17 vanbasten17 marked this pull request as draft February 17, 2021 11:37
@github-actions

This comment has been minimized.

@codecov
Copy link

codecov bot commented Feb 17, 2021

Codecov Report

Merging #1321 (2c94fcf) into master (96acd78) will increase coverage by 2.85%.
The diff coverage is 84.61%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1321      +/-   ##
==========================================
+ Coverage   60.55%   63.40%   +2.85%     
==========================================
  Files         250      250              
  Lines        7146     7059      -87     
  Branches     1199     1186      -13     
==========================================
+ Hits         4327     4476     +149     
+ Misses       2494     2245     -249     
- Partials      325      338      +13     
Flag Coverage Δ
botonic-cli 32.67% <84.61%> (+32.31%) ⬆️
botonic-core 44.96% <ø> (ø)
botonic-nlu 64.47% <ø> (ø)
botonic-plugin-contentful 71.61% <ø> (+0.02%) ⬆️
botonic-plugin-dynamodb 79.62% <ø> (ø)
botonic-plugin-nlu 9.09% <ø> (ø)
botonic-react 58.20% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
packages/botonic-cli/src/commands/deploy.ts 21.36% <ø> (+21.36%) ⬆️
packages/botonic-cli/src/commands/new.ts 86.66% <83.33%> (+86.66%) ⬆️
packages/botonic-cli/src/botonic-api-service.ts 31.11% <100.00%> (+31.11%) ⬆️
packages/botonic-cli/src/botonic-examples.ts 100.00% <100.00%> (ø)
...plugin-contentful/src/contentful/cms-contentful.ts 88.65% <0.00%> (+1.03%) ⬆️
packages/botonic-cli/src/utils.ts 58.33% <0.00%> (+58.33%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 96acd78...2c94fcf. Read the comment docs.

@github-actions

This comment has been minimized.

@vanbasten17 vanbasten17 marked this pull request as ready for review February 22, 2021 12:09
@vanbasten17 vanbasten17 changed the title wip(cli): cli improvements refactor: remove force flag and improved error handling Feb 22, 2021
@vanbasten17 vanbasten17 changed the title refactor: remove force flag and improved error handling refactor(cli): remove force flag and improved error handling Feb 22, 2021
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@vanbasten17 vanbasten17 force-pushed the chore/cli-improvements branch from 9079d17 to 738888e Compare February 22, 2021 14:52
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@vanbasten17 vanbasten17 force-pushed the chore/cli-improvements branch from 738888e to fbdb87e Compare February 22, 2021 14:55
@github-actions

This comment has been minimized.

@vanbasten17 vanbasten17 force-pushed the chore/cli-improvements branch from fbdb87e to a2e3029 Compare February 22, 2021 14:57
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@vanbasten17 vanbasten17 force-pushed the chore/cli-improvements branch from a2e3029 to b06b1e1 Compare February 22, 2021 15:16
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

packages/botonic-cli/src/commands/new.ts Outdated Show resolved Hide resolved
packages/botonic-cli/tests/new.test.ts Outdated Show resolved Hide resolved
packages/botonic-cli/tests/new.test.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@dpinol dpinol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see comments

Copy link
Contributor

@manuelfidalgo manuelfidalgo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏 Nice work! It is not easy to develop tests for cli

packages/botonic-cli/jest.config.js Show resolved Hide resolved
packages/botonic-cli/tests/deploy.test.ts Outdated Show resolved Hide resolved
@vanbasten17 vanbasten17 force-pushed the chore/cli-improvements branch from 23d2370 to c247014 Compare March 1, 2021 13:00
@github-actions

This comment has been minimized.

@vanbasten17 vanbasten17 force-pushed the chore/cli-improvements branch from c247014 to 638b80e Compare March 1, 2021 14:11
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@vanbasten17 vanbasten17 force-pushed the chore/cli-improvements branch from 638b80e to 2c94fcf Compare March 3, 2021 09:40
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@vanbasten17 vanbasten17 merged commit 2e935d8 into master Mar 3, 2021
@vanbasten17 vanbasten17 deleted the chore/cli-improvements branch March 3, 2021 09:46
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions
Copy link

github-actions bot commented Mar 3, 2021

Unit Test Results

1 files  ±0  3 suites  ±0   2m 55s ⏱️ ±0s
8 tests ±0  8 ✔️ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 2e935d8. ± Comparison against base commit 2e935d8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants