Skip to content

Commit 6d2d7a6

Browse files
authored
Merge pull request #9 from LambdaTest/stage
update README file
2 parents 7a0dcdf + 8945b23 commit 6d2d7a6

File tree

1 file changed

+55
-2
lines changed

1 file changed

+55
-2
lines changed

README.md

Lines changed: 55 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,60 @@
11
# smartui-github-testing
22

3-
43
For Testing Github App Integration with SmartUI
54

6-
- Just do a commit
75

6+
7+
### Getting Started Github App Integration with SmartUI Product - Selenium Automation
8+
9+
Steps 1: Setup Github App with lambdatest from link github setup
10+
11+
- Using OAuth
12+
13+
- Cloud, or
14+
15+
- Self Hosted
16+
17+
18+
Step 2: Once setup is done, you will see like
19+
20+
21+
Step 3: Now you need to setup a sample repository where your test case are mentioned, [smartui-github-testing](https://github.com/LambdaTest/smartui-github-testing)
22+
23+
Step 4: For Github Status updates on PR/ commit need to add capabilities in test suite,
24+
25+
```
26+
github: {
27+
"url": "https://api.github.com/repos/OWNER/REPO/statuses/commitId",
28+
"owner": "{OWNER}", //Optional
29+
"repo": "{REPO}", //Optional
30+
"commit": "{commitId}" //Optional
31+
},
32+
```
33+
34+
Step5: How to get the `github.url` value in test suite
35+
36+
Here we have taken an example of github action, Add below steps in your github action file [.github/workflows/ci.yml](https://github.com/LambdaTest/smartui-github-testing/blob/main/.github/workflows/ci.yml)
37+
38+
```
39+
name: Execute SmartUI Test with Github App Integration
40+
runs-on: ubuntu-latest
41+
steps:
42+
- uses: actions/checkout@v1
43+
44+
- name: Create commit status
45+
run: |
46+
API_HOST=https://api.github.com
47+
# Check out the PR branch
48+
git checkout $GITHUB_HEAD_REF
49+
# Get the commit ID of the last commit
50+
COMMIT_ID=$(git rev-parse HEAD)
51+
echo "Last commit ID of PR: $COMMIT_ID"
52+
GITHUB_URL=$API_HOST/repos/$GITHUB_REPOSITORY/statuses/$COMMIT_ID
53+
echo "GITHUB_URL: $GITHUB_URL"
54+
echo "GITHUB_URL=$GITHUB_URL" >> $GITHUB_ENV
55+
```
56+
57+
58+
Step 6: Commit you changes over git on a branch and raise the PR to main branch
59+
60+
Step 7: Now you will see the `lambdatest-smartui-app` check in the PR

0 commit comments

Comments
 (0)