-
Notifications
You must be signed in to change notification settings - Fork 405
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Port the publish workflow to GitHub Actions (#1384)
* Port the publish workflow to GitHub Actions Signed-off-by: CaptainIRS <[email protected]> * Change dependency and remove Azure Pipelines Signed-off-by: CaptainIRS <[email protected]> * Move to using reusable workflows Signed-off-by: CaptainIRS <[email protected]> * Remove integration tests from CI for main branch Signed-off-by: CaptainIRS <[email protected]>
- Loading branch information
1 parent
ae23774
commit e7a5a17
Showing
7 changed files
with
76 additions
and
71 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
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,12 @@ | ||
name: CI (Publish) | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
unit-tests: | ||
uses: ./.github/workflows/unit-tests.yml | ||
publish-caliper: | ||
uses: ./.github/workflows/publish.yml | ||
needs: unit-tests |
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,12 @@ | ||
name: CI (PR) | ||
|
||
on: | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
unit-tests: | ||
uses: ./.github/workflows/unit-tests.yml | ||
integration-tests: | ||
uses: ./.github/workflows/integration-tests.yml | ||
needs: unit-tests |
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,21 @@ | ||
name: Publish | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
publish-caliper: | ||
name: Publish Caliper | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Use Node.js 16.x | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16.x | ||
- name: Publish Caliper | ||
run: .build/publish-caliper.sh | ||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
DOCKER_USER: ${{ secrets.DOCKERHUB_USERNAME }} | ||
DOCKER_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} |
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,28 @@ | ||
name: Unit Tests | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
unit-tests: | ||
name: 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 was deleted.
Oops, something went wrong.