|
21 | 21 | GH_TOKEN: ${{ secrets.SELENIUM_CI_TOKEN }} |
22 | 22 |
|
23 | 23 | jobs: |
24 | | - test_examples: |
| 24 | + tests: |
25 | 25 | strategy: |
26 | 26 | fail-fast: false |
27 | 27 | matrix: |
28 | | - os: [ ubuntu-latest, windows-latest, macos-latest ] |
29 | | - runs-on: ${{ matrix.os }} |
| 28 | + os: [ ubuntu, windows, macos ] |
| 29 | + release: [ stable, nightly ] |
| 30 | + runs-on: ${{ format('{0}-latest', matrix.os) }} |
30 | 31 | steps: |
31 | 32 | - name: Checkout GitHub repo |
32 | | - uses: actions/checkout@v2 |
| 33 | + uses: actions/checkout@v4 |
| 34 | + - name: Remove driver directories Windows |
| 35 | + if: matrix.os == 'windows' |
| 36 | + run: | |
| 37 | + rm "$env:ChromeWebDriver" -r -v |
| 38 | + rm "$env:EdgeWebDriver" -r -v |
| 39 | + rm "$env:GeckoWebDriver" -r -v |
| 40 | + - name: Remove driver directories Non-Windows |
| 41 | + if: matrix.os != 'windows' |
| 42 | + run: | |
| 43 | + sudo rm -rf $CHROMEWEBDRIVER $EDGEWEBDRIVER $GECKOWEBDRIVER |
33 | 44 | - name: Start Xvfb |
34 | | - if: matrix.os == 'ubuntu-latest' |
| 45 | + if: matrix.os == 'ubuntu' |
35 | 46 | run: Xvfb :99 & |
36 | 47 | - name: Set up Java |
37 | | - uses: actions/setup-java@v2 |
| 48 | + id: java |
| 49 | + uses: actions/setup-java@v4 |
38 | 50 | with: |
39 | 51 | distribution: 'temurin' |
40 | | - java-version: 8 |
41 | | - - name: Install Chrome |
42 | | - uses: browser-actions/setup-chrome@latest |
43 | | - - name: Install Edge |
44 | | - uses: browser-actions/setup-edge@latest |
45 | | - - name: Install Firefox |
46 | | - |
| 52 | + java-version: 17 |
| 53 | + - name: Import test cert non-Windows |
| 54 | + if: matrix.os != 'windows' |
| 55 | + run: sudo keytool -import -noprompt -trustcacerts -alias SeleniumHQ -file examples/java/src/test/resources/tls.crt -keystore ${{ steps.java.outputs.path }}/lib/security/cacerts -storepass changeit |
| 56 | + - name: Import test cert Windows |
| 57 | + if: matrix.os == 'windows' |
| 58 | + run: keytool -import -noprompt -trustcacerts -alias SeleniumHQ -file examples/java/src/test/resources/tls.crt -keystore ${{ steps.java.outputs.path }}/lib/security/cacerts -storepass changeit |
| 59 | + - name: Run Tests Stable |
| 60 | + if: matrix.release == 'stable' |
| 61 | + uses: nick-invision/[email protected] |
47 | 62 | with: |
48 | | - browser: firefox |
49 | | - version: latest |
50 | | - - name: Run Tests |
51 | | - uses: nick-invision/[email protected] |
| 63 | + timeout_minutes: 40 |
| 64 | + max_attempts: 3 |
| 65 | + command: | |
| 66 | + cd examples/java |
| 67 | + mvn -B test -D"jdk.internal.httpclient.disableHostnameVerification=true" |
| 68 | + - name: Run Tests Nightly Linux/macOS |
| 69 | + if: matrix.release == 'nightly' && matrix.os != 'windows' |
| 70 | + uses: nick-invision/[email protected] |
| 71 | + with: |
| 72 | + timeout_minutes: 40 |
| 73 | + max_attempts: 3 |
| 74 | + command: | |
| 75 | + pip install yq |
| 76 | + xml_content=$(curl -sf https://oss.sonatype.org/service/local/repositories/snapshots/content/org/seleniumhq/selenium/selenium-java/) |
| 77 | + latest_snapshot=$(echo "$xml_content" | xq '.content.data."content-item"' | jq -r 'sort_by(.lastModified) | last | .text') |
| 78 | + echo "Latest Selenium Snapshot: $latest_snapshot" |
| 79 | + cd examples/java |
| 80 | + mvn -B -U test -D"jdk.internal.httpclient.disableHostnameVerification=true" |
| 81 | +
|
| 82 | + - name: Run Tests Nightly Windows |
| 83 | + if: matrix.release == 'nightly' && matrix.os == 'windows' |
| 84 | + uses: nick-invision/[email protected] |
52 | 85 | with: |
53 | | - timeout_minutes: 20 |
| 86 | + timeout_minutes: 40 |
54 | 87 | max_attempts: 3 |
55 | 88 | command: | |
| 89 | + pip install yq |
| 90 | + $xml_content = Invoke-WebRequest -Uri "https://oss.sonatype.org/service/local/repositories/snapshots/content/org/seleniumhq/selenium/selenium-java/" |
| 91 | + $latest_snapshot = $xml_content.Content | xq '.content.data.\"content-item\"' | jq -r 'sort_by(.lastModified) | last | .text' |
| 92 | + Write-Output "Latest Selenium Snapshot: $latest_snapshot" |
56 | 93 | cd examples/java |
57 | | - mvn -B test |
| 94 | + mvn -B -U test -D"jdk.internal.httpclient.disableHostnameVerification=true" |
0 commit comments