Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ jobs:
- name: Run unit tests
run: |
npm ci
npm run build
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

for running the tests, don't we need to build the package to ensure the files are generated?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

prepare script is executed when you:

  1. run npm install or npm ci in order to prepare package itself (but it doesn't when you install package into another project via npm install <package-name>)
  2. before npm pack and npm publish

So after npm ci it will be completely ready for use

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Also I checked CI - unit tests are still passing (as well as e2e are running but fail with connection error), which basically confirms that it works 🙂

Copy link
Copy Markdown
Contributor

@moderakh moderakh Jul 12, 2022

Choose a reason for hiding this comment

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

Thanks @kravets-levko for the explanation.

one other question for you, not directly related to this PR though, as this has been failing for a while.
why is the second CI failing?
Screen Shot 2022-07-12 at 3 27 34 PM

Copy link
Copy Markdown
Contributor Author

@kravets-levko kravets-levko Jul 12, 2022

Choose a reason for hiding this comment

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

It needs credentials which are passed through repository secrets. But Github does not pass secrets to PRs from forks (there are security reasons). Therefore it doesn't pass on such external PRs, but will pass on PRs within the repo and on master. Currently we're trying to find some solution for this

npm run test
- name: Run e2e tests
env:
Expand All @@ -59,7 +58,6 @@ jobs:
E2E_TABLE_SUFFIX: ${{github.sha}}
run: |
npm ci
npm run build
npm run e2e
- name: Coverage
run: |
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
"node": ">=14.0.0"
},
"scripts": {
"prepack": "npm run build",
"prepublish": "npm run build",
"prepare": "npm run build",
"e2e": "nyc --reporter=lcov --report-dir=coverage_e2e mocha 'tests/e2e/**/*.test.js' --timeout=300000",
"test": "nyc --reporter=lcov --report-dir=coverage_unit mocha 'tests/unit/**/*.test.js'",
"coverage": "codecov",
Expand Down