Skip to content

Commit

Permalink
Test package publish
Browse files Browse the repository at this point in the history
Signed-off-by: CaptainIRS <[email protected]>
  • Loading branch information
CaptainIRS committed Jul 18, 2022
1 parent 8a792e0 commit fbd0594
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 3 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/package-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Test Published Package

on:
workflow_call:

jobs:
package-tests:
name: Test Published Package
runs-on: ubuntu-latest
services:
verdaccio:
image: verdaccio/verdaccio
ports:
- 4873:4873
steps:
- uses: actions/checkout@v3
- name: Use Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Install dependencies
run: npm install
working-directory: ./packages/caliper-publish
- name: Initialize npm
run: |
npm install -g npm-cli-login
npm-cli-login
env:
NPM_USER: npm_user
NPM_PASS: npm_pass
NPM_EMAIL: [email protected]
NPM_REGISTRY: http://localhost:4873
- name: Publish Caliper
run: ./run-with-build.sh
working-directory: ./packages/caliper-tests-integration/fabric_docker_local_tests
env:
DOCKER_USER: ${{ secrets.DOCKERHUB_USERNAME }}
3 changes: 3 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ jobs:
integration-tests:
uses: ./.github/workflows/integration-tests.yml
needs: unit-tests
package-tests:
uses: ./.github/workflows/package-tests.yml
needs: dci-lint
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,8 @@ cd ${DIR}

# Publish the packages locally and build a local test image
cd ./../../caliper-publish/
./publish.js verdaccio start
sleep 5s
./publish.js npm --registry http://localhost:4873
./publish.js docker --registry http://localhost:4873 --image caliper --tag test
./publish.js verdaccio stop

# back to this dir
cd ${DIR}
Expand Down

0 comments on commit fbd0594

Please sign in to comment.