Skip to content

Commit

Permalink
Merge 11ee9ce into bdc6bd7
Browse files Browse the repository at this point in the history
  • Loading branch information
SushilMallRC committed May 1, 2024
2 parents bdc6bd7 + 11ee9ce commit cdd8425
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 28 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
name: CI Pipeline

on: [push, pull_request]
name: Release Package
on:
push:
tags:
- '*'

jobs:
test:
Test:
runs-on: ubuntu-latest # Firefox in it
strategy:
matrix:
Expand All @@ -21,21 +23,8 @@ jobs:
- run: npm run build
- run: npm run test:browser
- run: npm run test:coverage
- run: cat */coverage/lcov.info
- name: Coveralls SDK
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
base-path: ./sdk
flag-name: sdk
parallel: true
- name: Coveralls
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
build:
needs: test
Release:
needs: Test
runs-on: ubuntu-latest # Firefox in it
strategy:
matrix:
Expand All @@ -52,16 +41,8 @@ jobs:
registry-url: 'https://registry.npmjs.org'
- run: npm install
- run: npm run build
- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch
- run: git status && git stash
- run: echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- run: npm run publish:release -- --canary --preid=$BRANCH.$GITHUB_RUN_ID.$GITHUB_RUN_NUMBER --dist-tag=$BRANCH --yes
if: ${{ contains(env.TAG, 'refs/heads') && github.event_name == 'push' && github.repository == 'ringcentral/ringcentral-js' }}
env:
BRANCH: ${{ steps.extract_branch.outputs.branch }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm run publish:release -- $TAG --yes
if: ${{ env.TAG != '' && !contains(env.TAG, '/') && github.repository == 'ringcentral/ringcentral-js' }}
env:
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Test Code

on: [push, pull_request]

jobs:
Test:
runs-on: ubuntu-latest # Firefox in it
strategy:
matrix:
node-version: [16.x]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org'
- run: npm install
- run: DEBUG=eslint:cli-engine npm run lint:all
- run: npm run build
- run: npm run test:browser
- run: npm run test:coverage
- run: cat */coverage/lcov.info
- name: Coveralls SDK
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
base-path: ./sdk
flag-name: sdk
parallel: true
- name: Coveralls
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true

0 comments on commit cdd8425

Please sign in to comment.