Skip to content

Commit 2b93a83

Browse files
authored
Merge pull request #27 from srivishnua-lambdatest/main
Adds the CI workflow file for SDK & Hooks sample update
2 parents b99a7f4 + 796d6c0 commit 2b93a83

File tree

3 files changed

+75
-260
lines changed

3 files changed

+75
-260
lines changed
Lines changed: 39 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,39 @@
1-
name: Quality Checks
2-
on:
3-
pull_request:
4-
branches:
5-
- main
6-
7-
env:
8-
LT_USERNAME: ${{ secrets.LT_USERNAME }}
9-
LT_ACCESS_KEY: ${{ secrets.LT_ACCESS_KEY }}
10-
GRID_HOST: ${{ secrets.GRID_HOST }}
11-
12-
jobs:
13-
SmartUI-Gihub-Action:
14-
name: Execute SmartUI Test with Github App Integration
15-
runs-on: ubuntu-latest
16-
steps:
17-
- uses: actions/checkout@v1
18-
19-
- name: Create commit status
20-
run: |
21-
API_HOST=https://api.github.com
22-
# Check out the PR branch
23-
git checkout $GITHUB_HEAD_REF
24-
# Get the commit ID of the last commit
25-
COMMIT_ID=$(git rev-parse HEAD)
26-
echo "Commit ID of PR: $COMMIT_ID"
27-
GITHUB_URL=$API_HOST/repos/$GITHUB_REPOSITORY/statuses/$COMMIT_ID
28-
echo "GITHUB_URL: $GITHUB_URL"
29-
echo "GITHUB_URL=$GITHUB_URL" >> $GITHUB_ENV
30-
31-
- name: Install Dependencies
32-
run: npm install
33-
34-
- name: Execute Test
35-
run: npm test
36-
37-
- name: Execute Multiple tests
38-
run: npm run multiple
1+
name: NodeJS Selenium Web Autoamtion Hooks CI
2+
on:
3+
pull_request:
4+
branches:
5+
- main
6+
7+
env:
8+
LT_USERNAME: ${{ secrets.LT_USERNAME }}
9+
LT_ACCESS_KEY: ${{ secrets.LT_ACCESS_KEY }}
10+
GRID_HOST: ${{ secrets.GRID_HOST }}
11+
12+
jobs:
13+
SmartUI-Gihub-Action:
14+
name: Execute SmartUI Test with Github App Integration
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout code
18+
if: github.event_name == 'pull_request'
19+
uses: actions/checkout@v3
20+
with:
21+
ref: ${{ github.head_ref }}
22+
23+
- name: Create commit status
24+
run: |
25+
API_HOST=https://api.github.com
26+
# Check out the PR branch
27+
git checkout $GITHUB_HEAD_REF
28+
# Get the commit ID of the last commit
29+
COMMIT_ID=$(git rev-parse HEAD)
30+
echo "Commit ID of PR: $COMMIT_ID"
31+
GITHUB_URL=$API_HOST/repos/$GITHUB_REPOSITORY/statuses/$COMMIT_ID
32+
echo "GITHUB_URL: $GITHUB_URL"
33+
echo "GITHUB_URL=$GITHUB_URL" >> $GITHUB_ENV
34+
35+
- name: Install Dependencies & Execute tests
36+
run: |
37+
cd hooks
38+
npm install
39+
npm test

.github/workflows/SDK-ci.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: NodeJS SDK Wrapper CI
2+
on:
3+
pull_request:
4+
branches:
5+
- main
6+
workflow_dispatch:
7+
8+
env:
9+
LT_USERNAME: ${{ secrets.LT_USERNAME }}
10+
LT_ACCESS_KEY: ${{ secrets.LT_ACCESS_KEY }}
11+
PROJECT_TOKEN: ${{ secrets.PROJECT_TOKEN }}
12+
LT_SDK_DEBUG: true
13+
SMARTUI_DEBUG: true
14+
15+
jobs:
16+
smartui-nodejs-sdk:
17+
name: Execute NodeJS sdk build
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout code
21+
if: github.event_name == 'pull_request'
22+
uses: actions/checkout@v3
23+
with:
24+
ref: ${{ github.head_ref }}
25+
26+
- name: Install Dependencies
27+
run: |
28+
npm i @lambdatest/smartui-cli
29+
30+
- name: Execute NodeJS Wrapper
31+
run: |
32+
cd sdk
33+
npm i
34+
npx smartui --version
35+
npx smartui config:create smartui-web.json
36+
npx smartui --config smartui-web.json exec -- npm run smartui-cloud

hooks/package-lock.json

Lines changed: 0 additions & 222 deletions
This file was deleted.

0 commit comments

Comments
 (0)