Skip to content

Commit

Permalink
Merge pull request #27 from srivishnua-lambdatest/main
Browse files Browse the repository at this point in the history
Adds the CI workflow file for SDK & Hooks sample update
  • Loading branch information
sushobhit-lt authored Feb 13, 2024
2 parents b99a7f4 + 796d6c0 commit 2b93a83
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 260 deletions.
77 changes: 39 additions & 38 deletions .github/workflows/ci.yml → .github/workflows/LThooks-ci.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,39 @@
name: Quality Checks
on:
pull_request:
branches:
- main

env:
LT_USERNAME: ${{ secrets.LT_USERNAME }}
LT_ACCESS_KEY: ${{ secrets.LT_ACCESS_KEY }}
GRID_HOST: ${{ secrets.GRID_HOST }}

jobs:
SmartUI-Gihub-Action:
name: Execute SmartUI Test with Github App Integration
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1

- name: Create commit status
run: |
API_HOST=https://api.github.com
# Check out the PR branch
git checkout $GITHUB_HEAD_REF
# Get the commit ID of the last commit
COMMIT_ID=$(git rev-parse HEAD)
echo "Commit ID of PR: $COMMIT_ID"
GITHUB_URL=$API_HOST/repos/$GITHUB_REPOSITORY/statuses/$COMMIT_ID
echo "GITHUB_URL: $GITHUB_URL"
echo "GITHUB_URL=$GITHUB_URL" >> $GITHUB_ENV
- name: Install Dependencies
run: npm install

- name: Execute Test
run: npm test

- name: Execute Multiple tests
run: npm run multiple
name: NodeJS Selenium Web Autoamtion Hooks CI
on:
pull_request:
branches:
- main

env:
LT_USERNAME: ${{ secrets.LT_USERNAME }}
LT_ACCESS_KEY: ${{ secrets.LT_ACCESS_KEY }}
GRID_HOST: ${{ secrets.GRID_HOST }}

jobs:
SmartUI-Gihub-Action:
name: Execute SmartUI Test with Github App Integration
runs-on: ubuntu-latest
steps:
- name: Checkout code
if: github.event_name == 'pull_request'
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}

- name: Create commit status
run: |
API_HOST=https://api.github.com
# Check out the PR branch
git checkout $GITHUB_HEAD_REF
# Get the commit ID of the last commit
COMMIT_ID=$(git rev-parse HEAD)
echo "Commit ID of PR: $COMMIT_ID"
GITHUB_URL=$API_HOST/repos/$GITHUB_REPOSITORY/statuses/$COMMIT_ID
echo "GITHUB_URL: $GITHUB_URL"
echo "GITHUB_URL=$GITHUB_URL" >> $GITHUB_ENV
- name: Install Dependencies & Execute tests
run: |
cd hooks
npm install
npm test
36 changes: 36 additions & 0 deletions .github/workflows/SDK-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: NodeJS SDK Wrapper CI
on:
pull_request:
branches:
- main
workflow_dispatch:

env:
LT_USERNAME: ${{ secrets.LT_USERNAME }}
LT_ACCESS_KEY: ${{ secrets.LT_ACCESS_KEY }}
PROJECT_TOKEN: ${{ secrets.PROJECT_TOKEN }}
LT_SDK_DEBUG: true
SMARTUI_DEBUG: true

jobs:
smartui-nodejs-sdk:
name: Execute NodeJS sdk build
runs-on: ubuntu-latest
steps:
- name: Checkout code
if: github.event_name == 'pull_request'
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}

- name: Install Dependencies
run: |
npm i @lambdatest/smartui-cli
- name: Execute NodeJS Wrapper
run: |
cd sdk
npm i
npx smartui --version
npx smartui config:create smartui-web.json
npx smartui --config smartui-web.json exec -- npm run smartui-cloud
222 changes: 0 additions & 222 deletions hooks/package-lock.json

This file was deleted.

0 comments on commit 2b93a83

Please sign in to comment.