Skip to content

Commit

Permalink
Merge pull request #45 from 07souravkunda/add_staging_pakage_publish
Browse files Browse the repository at this point in the history
add: staging npm package publish
  • Loading branch information
07souravkunda authored Dec 11, 2023
2 parents 3673a15 + 7ef35b5 commit 69c6ae6
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/reviewing_changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:
commit_sha:
description: 'The full commit id to build'
required: true
package_url:
description: 'Staging package url'
required: false

jobs:
comment-run:
Expand All @@ -23,6 +26,7 @@ jobs:
env:
BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }}
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
PACKAGE_URL: ${{ github.event.inputs.package_url }}

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -52,6 +56,18 @@ jobs:
with:
node-version: ${{ matrix.node }}

- name: Setup staging npm package
if: ${{ github.event.inputs.package_url != '' }}
run: |
echo 'Publishing tar.gz to local registry'
curl -o staging_package.tgz "$PACKAGE_URL"
npm install verdaccio -g
verdaccio &
npm config set registry http://localhost:4873
npm install -g npm-cli-adduser && npm-cli-adduser -u dummy -p dummy -e dummy@gmail.com -r http://localhost:4873
npm publish staging_package.tgz --registry http://localhost:4873/
shell: bash

- name: Install dependencies
run: npm install

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ JestJS integration with BrowserStack for E2E functional testing of UI using Sele

---
- Clone the repository
- Install dependencies using, npm install or yarn install
- Install dependencies using, npm install or yarn install
- Set your [BrowserStack Username and Access Key](https://www.browserstack.com/accounts/settings) in [browserstack.yml](browserstack.yml) `npx setup --username userName --key accessKey`
- To run sample test, run `npm run sample-test` or `yarn run sample-test`
- To run sample test, run `npm run sample-test` or `yarn run sample-test`
- To run tests on private websites,
- set browserstackLocal: true at [browserstack.yml](browserstack.yml)
- run `npm run sample-local-test` or `yarn run sample-local-test`
Expand Down

0 comments on commit 69c6ae6

Please sign in to comment.