build(deps): bump the dependencies group across 1 directory with 9 up… #1135
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: Test boyka-framework project | |
on: | |
pull_request: | |
branches: | |
- main | |
paths: | |
- 'core-java/**' | |
- '.github/workflows/**' | |
push: | |
branches: | |
- main | |
paths: | |
- 'core-java/**' | |
concurrency: | |
group: boyka-tests-${{ github.ref }}-1 | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v4 | |
- name: Install Java and Maven | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: 'temurin' | |
cache: 'maven' | |
check-latest: true | |
- name: Build the project | |
run: mvn clean install -f core-java/pom.xml -DskipTests | |
check-cloud: | |
runs-on: ubuntu-latest | |
needs: | |
- build | |
env: | |
LT_USER: ${{ secrets.LT_USER }} | |
BS_USER: ${{ secrets.BS_USER }} | |
outputs: | |
bs-present: ${{ steps.bs-secrets.outputs.present }} | |
lt-present: ${{ steps.lt-secrets.outputs.present }} | |
steps: | |
- name: Check BrowserStack secrets presence | |
id: bs-secrets | |
shell: bash | |
run: | | |
if [ "$BS_USER" == "" ]; then | |
echo "present=NO" >> $GITHUB_OUTPUT | |
else | |
echo "present=YES" >> $GITHUB_OUTPUT | |
fi | |
- name: Check LambdaTest secrets presence | |
id: lt-secrets | |
shell: bash | |
run: | | |
if [ "$LT_USER" == "" ]; then | |
echo "present=NO" >> $GITHUB_OUTPUT | |
else | |
echo "present=YES" >> $GITHUB_OUTPUT | |
fi | |
test-api: | |
needs: | |
- check-cloud | |
uses: ./.github/workflows/_test-core-java.yml | |
with: | |
suite-name: testng-api | |
test-others: | |
needs: | |
- check-cloud | |
uses: ./.github/workflows/_test-core-java.yml | |
with: | |
suite-name: testng-others | |
runs-on: windows-latest | |
test-web-local: | |
needs: | |
- check-cloud | |
uses: ./.github/workflows/_test-core-java.yml | |
with: | |
suite-name: testng-web-local | |
runs-on: macos-13 | |
test-web-bs: | |
needs: | |
- check-cloud | |
if: ${{ needs.check-cloud.outputs.bs-present == 'YES' }} | |
uses: ./.github/workflows/_test-core-java.yml | |
secrets: | |
cloudUser: ${{ secrets.BS_USER }} | |
cloudKey: ${{ secrets.BS_KEY }} | |
with: | |
suite-name: testng-web-bs | |
test-web-lt: | |
needs: | |
- check-cloud | |
if: ${{ needs.check-cloud.outputs.lt-present == 'YES' }} | |
uses: ./.github/workflows/_test-core-java.yml | |
secrets: | |
cloudUser: ${{ secrets.LT_USER }} | |
cloudKey: ${{ secrets.LT_KEY }} | |
with: | |
suite-name: testng-web-lt | |
test-web-grid: | |
needs: | |
- check-cloud | |
uses: ./.github/workflows/_test-core-java.yml | |
with: | |
suite-name: testng-web-grid | |
run-grid: true | |
test-mobile-android-local: | |
needs: | |
- check-cloud | |
uses: ./.github/workflows/_test-core-java.yml | |
with: | |
runs-on: ubuntu-latest | |
suite-name: testng-mobile-android-local | |
run-appium: true | |
run-ios: false | |
run-android: true | |
emulator-name: Pixel_8_Pro | |
emulator-profile: pixel_6_pro | |
emulator-version: 31 | |
# emulator-channel: canary | |
emulator-arch: x86_64 | |
emulator-target: google_apis | |
test-mobile-ios-local: | |
needs: | |
- check-cloud | |
uses: ./.github/workflows/_test-core-java.yml | |
with: | |
runs-on: macos-14 | |
suite-name: testng-mobile-ios-local | |
run-appium: true | |
run-ios: true | |
run-android: false | |
simulator-name: iPhone 15 | |
simulator-version: 17.5 | |
# test-mobile-web: | |
# needs: | |
# - check-cloud | |
# uses: ./.github/workflows/_test-core-java.yml | |
# with: | |
# runs-on: macos-14-large | |
# suite-name: testng-mobile-web | |
# run-appium: true | |
# run-ios: false | |
# run-android: true | |
# emulator-target: playstore | |
# emulator-version: 30 | |
test-mobile-bs: | |
needs: | |
- check-cloud | |
if: ${{ needs.check-cloud.outputs.bs-present == 'YES' }} | |
uses: ./.github/workflows/_test-core-java.yml | |
secrets: | |
cloudUser: ${{ secrets.BS_USER }} | |
cloudKey: ${{ secrets.BS_KEY }} | |
with: | |
suite-name: testng-mobile-bs | |
test-mobile-lt: | |
needs: | |
- check-cloud | |
if: ${{ needs.check-cloud.outputs.lt-present == 'YES' }} | |
uses: ./.github/workflows/_test-core-java.yml | |
secrets: | |
cloudUser: ${{ secrets.LT_USER }} | |
cloudKey: ${{ secrets.LT_KEY }} | |
with: | |
suite-name: testng-mobile-lt | |
report: | |
needs: | |
- test-api | |
- test-others | |
- test-web-local | |
- test-web-bs | |
- test-web-lt | |
- test-web-grid | |
- test-mobile-android-local | |
- test-mobile-ios-local | |
# - test-mobile-web | |
- test-mobile-bs | |
- test-mobile-lt | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v4 | |
- name: Install Java and Maven | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: 'temurin' | |
cache: 'maven' | |
check-latest: true | |
- name: Download reports-testng-api files | |
uses: actions/download-artifact@v4 | |
with: | |
name: reports-testng-api | |
path: ${{ github.workspace }}/core-java/reports | |
- name: Download reports-testng-mobile-bs files | |
uses: actions/download-artifact@v4 | |
with: | |
name: reports-testng-mobile-bs | |
path: ${{ github.workspace }}/core-java/reports | |
- name: Download reports-testng-mobile-android-local files | |
uses: actions/download-artifact@v4 | |
with: | |
name: reports-testng-mobile-android-local | |
path: ${{ github.workspace }}/core-java/reports | |
- name: Download reports-testng-mobile-ios-local files | |
uses: actions/download-artifact@v4 | |
with: | |
name: reports-testng-mobile-ios-local | |
path: ${{ github.workspace }}/core-java/reports | |
# - name: Download reports-testng-mobile-web files | |
# uses: actions/download-artifact@v4 | |
# with: | |
# name: reports-testng-mobile-web | |
# path: ${{ github.workspace }}/core-java/reports | |
- name: Download reports-testng-mobile-lt files | |
uses: actions/download-artifact@v4 | |
with: | |
name: reports-testng-mobile-lt | |
path: ${{ github.workspace }}/core-java/reports | |
- name: Download reports-testng-others files | |
uses: actions/download-artifact@v4 | |
with: | |
name: reports-testng-others | |
path: ${{ github.workspace }}/core-java/reports | |
- name: Download reports-testng-web-bs files | |
uses: actions/download-artifact@v4 | |
with: | |
name: reports-testng-web-bs | |
path: ${{ github.workspace }}/core-java/reports | |
- name: Download reports-testng-web-grid files | |
uses: actions/download-artifact@v4 | |
with: | |
name: reports-testng-web-grid | |
path: ${{ github.workspace }}/core-java/reports | |
- name: Download reports-testng-web-local files | |
uses: actions/download-artifact@v4 | |
with: | |
name: reports-testng-web-local | |
path: ${{ github.workspace }}/core-java/reports | |
- name: Download reports-testng-web-lt files | |
uses: actions/download-artifact@v4 | |
with: | |
name: reports-testng-web-lt | |
path: ${{ github.workspace }}/core-java/reports | |
- name: Generate Code Coverage Report | |
run: | | |
mvn verify org.jacoco:jacoco-maven-plugin:prepare-agent -f core-java/pom.xml -Pcoverage-report | |
- name: Upload target folder | |
uses: actions/upload-artifact@v4 | |
if: ${{ always() }} | |
with: | |
name: target-${{ github.run_id }} | |
retention-days: 1 | |
path: | | |
${{ github.workspace }}/core-java/target | |
${{ github.workspace }}/core-java/logs | |
${{ github.workspace }}/core-java/selenium-grid.log | |
${{ github.workspace }}/core-java/screenshots | |
- name: Upload reports folder | |
uses: actions/upload-artifact@v4 | |
with: | |
name: reports-${{ github.run_id }} | |
retention-days: 1 | |
path: | | |
${{ github.workspace }}/core-java/reports | |
analysis: | |
needs: | |
- report | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install Java and Maven | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: 'maven' | |
check-latest: true | |
- name: Download target folder | |
uses: actions/download-artifact@v4 | |
with: | |
name: target-${{ github.run_id }} | |
path: ${{ github.workspace }}/core-java | |
- name: Download reports folder | |
uses: actions/download-artifact@v4 | |
with: | |
name: reports-${{ github.run_id }} | |
path: ${{ github.workspace }}/core-java | |
- name: Build and analyze | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
run: mvn -B sonar:sonar -f core-java/pom.xml -DskipTests -Dcheckstyle.skip | |
- name: SonarCloud Scan | |
uses: SonarSource/sonarcloud-github-action@master | |
env: | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
with: | |
projectBaseDir: core-java | |
args: > | |
-Dsonar.organization=boykaframework | |
-Dsonar.projectKey=boyka-framework | |
-Dsonar.exclusions=**/*.java |