BrowserStack facilities EN #53
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: BrowserStack facilities EN | |
on: | |
workflow_dispatch: | |
inputs: | |
filter: | |
description: 'Filter for tests' | |
required: true | |
default: '@Smoke and @Automated' | |
jobs: | |
test: | |
runs-on: ubuntu-22.04 | |
container: crowdar/lippia:3.3.0.0-jdk17 | |
environment: Automation | |
env: | |
BSUSER: ${{ secrets.BSUSER }} | |
AUTHTOKEN: ${{ secrets.AUTHTOKEN }} | |
BSDEVICE: ${{ secrets.BSDEVICE }} | |
BSAPP: ${{ secrets.BSAPP }} | |
BSOS: ${{ secrets.BSOS }} | |
steps: | |
- name: Checkout to the repository | |
uses: actions/checkout@v4 | |
- name: Configuring JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: List directories to verify path | |
run: ls -al ~/.m2 | |
- name: Cache Maven dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
- name: Checking Maven dependencies | |
run: mvn dependency:resolve | |
- name: Setting environment variable | |
run: echo "COMBINED_FILTER=${{ github.event.inputs.filter }}" >> $GITHUB_ENV | |
- name: Running Maven clean test | |
run: | | |
echo "Running tests with filter: '$COMBINED_FILTER'" | |
mvn clean test -Dcrowdar.cucumber.filter="'$COMBINED_FILTER'" -PBrowserStack -PAndroid | |
shell: bash | |
- name: Uploading test reports | |
uses: actions/upload-artifact@v4.3.4 | |
with: | |
name: test-results | |
path: target/reports/ | |
- name: Uploading surefire test reports | |
uses: actions/upload-artifact@v4.3.4 | |
with: | |
name: test-results-surefire | |
path: target/surefire-reports/ |