Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .github/workflows/comment-run.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# This job is to test different maven profiles in sdk branch again Pull Request raised
# This workflow targets Java with Maven execution

name: TestNG SDK Test workflow for Maven on comment RUN_TESTS

on:
issue_comment:
types: [ created, edited ]

jobs:
comment-run:
if: contains(github.event.comment.body, 'RUN_TESTS')
runs-on: ${{ matrix.os }}
strategy:
matrix:
java: [ '8', '11', '17' ]
os: [ 'macos-latest', 'windows-latest', 'ubuntu-latest' ]
name: TestNG Repo ${{ matrix.Java }} - ${{ matrix.os }} Sample
env:
BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }}
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}

steps:
- uses: actions/checkout@v3
- name: Set up Java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
- name: Set up Chrome
uses: browser-actions/setup-chrome@latest
with:
chrome-version: beta
- run: chrome --version
- name: Run mvn test
run: |
mvn compile
mvn test
- name: Run mvn profile skip-browserstack-test
run: |
mvn compile
mvn test -P skip-browserstack-test
- name: Run mvn profile sample-local-test
run: |
mvn compile
mvn test -P sample-local-test
- name: Run mvn profile sample-test
run: |
mvn compile
mvn test -P sample-test
10 changes: 1 addition & 9 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,9 @@ on:
pull_request:
branches: [ "sdk" ]
types: [ opened, reopened ]
issue_comment:
types: [ created, edited ]

jobs:
build:

maven-run:
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand All @@ -23,7 +20,6 @@ jobs:
BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }}
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}

# if: contains(github.event.comment.body, 'RUN_TESTS') || contains(fromJson('["opened", "reopened"]'), github.event.action)
steps:
- uses: actions/checkout@v3
- name: Set up Java
Expand All @@ -35,10 +31,6 @@ jobs:
uses: browser-actions/setup-chrome@latest
with:
chrome-version: beta
- name: print body
env:
BODY: ${{ github.event.comment.body }}
run: echo "$BODY"
- run: chrome --version
- name: Run mvn test
run: |
Expand Down