forked from project-sunbird/sunbird-player-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.yml
51 lines (51 loc) · 1.73 KB
/
config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
version: 2.1
orbs:
browser-tools: circleci/[email protected]
jobs:
build:
working_directory: ~/sunbird-player-sdk
docker:
- image: cimg/node:20.4.0-browsers
steps:
- browser-tools/install-chrome
- browser-tools/install-chromedriver
- run:
command: |
google-chrome --version
chromedriver --version
name: Check install
- checkout:
path: ~/sunbird-player-sdk
- run:
name: Show current branch
command: echo ${CIRCLE_BRANCH}
- run:
name: Install depedencies
command: npm install --legacy-peer-deps
- run:
name: Linting the library
command: npm run lint
- run:
name: Run test cases
command: npm run test
- run:
name: Install sonar scanner
command: 'sudo npm install -i -g sonarqube-scanner'
- run:
name: Sonar scanner
command: sonar-scanner -Dsonar.projectKey=project-sunbird_sunbird-player-sdk -Dsonar.organization=project-sunbird -Dsonar.host.url=https://sonarcloud.io -Dsonar.language=ts -Dsonar.sources=projects/sunbird-player-sdk/src -Dsonar.typescript.lcov.reportPaths=coverage/sunbird-player-sdk/lcov.info
- run:
name: Publish to NPM
command: |
if [ -z $CIRCLE_PR_NUMBER ]; then
npm run pre-publish && npm pack ./dist/sunbird-player-sdk
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc
npm publish project-sunbird-sunbird-player-sdk-v9-*
else
npm run pre-publish && npm pack ./dist/sunbird-player-sdk
fi
workflows:
version: 2.1
build_and_test:
jobs:
- build