-
Notifications
You must be signed in to change notification settings - Fork 402
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Port the unit test workflow to GitHub Actions (#1364)
* Port unit test workflow to GitHub Actions Signed-off-by: CaptainIRS <36656347+CaptainIRS@users.noreply.github.com> * Change workflow name for good badge name Signed-off-by: CaptainIRS <36656347+CaptainIRS@users.noreply.github.com> * Add badge in README Signed-off-by: CaptainIRS <36656347+CaptainIRS@users.noreply.github.com> * Generate package lock with `npm install --package-lock-only` Signed-off-by: CaptainIRS <36656347+CaptainIRS@users.noreply.github.com> * Remove caching for now - will tackle this later Signed-off-by: CaptainIRS <36656347+CaptainIRS@users.noreply.github.com>
- Loading branch information
1 parent
0c1e973
commit 5b96845
Showing
3 changed files
with
31 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Unit Tests | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
unit-tests: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [14.x, 16.x] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: Check correct usage of Caliper package names | ||
run: ./scripts/check-package-names.sh | ||
- name: Install project dependencies | ||
run: npm install | ||
- name: Bootstrap lerna | ||
run: npm run bootstrap | ||
- name: Check the version consistency of subpackages | ||
run: ./packages/caliper-publish/publish.js version check | ||
- name: Run unit tests | ||
run: npm test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters