|
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@v3 |
33 | | - - name: Install Chrome for set binary test |
34 | | - uses: browser-actions/setup-chrome@v1 |
35 | | - with: |
36 | | - chrome-version: stable |
37 | | - id: setup-chrome |
38 | | - - name: Install Edge for set binary test |
39 | | - uses: browser-actions/setup-edge@v1 |
40 | | - with: |
41 | | - edge-version: stable |
42 | | - id: setup-edge |
43 | | - - name: Install Firefox for set binary test |
44 | | - if: matrix.os != 'windows-latest' |
45 | | - uses: browser-actions/setup-firefox@v1 |
46 | | - with: |
47 | | - firefox-version: latest |
48 | | - id: setup-firefox |
49 | | - - name: Set ENV Windows |
50 | | - if: matrix.os == 'windows-latest' |
51 | | - run: | |
52 | | - echo "CHROME_BIN=${{ steps.setup-chrome.outputs.chrome-path }}" >> $env:GITHUB_ENV |
53 | | - echo "EDGE_BIN=C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" >> $env:GITHUB_ENV |
54 | | - echo "FF_BIN=C:\Program Files (x86)\Mozilla Firefox\firefox-browser.exe" >> $env:GITHUB_ENV |
55 | | - - name: Set ENV Mac |
56 | | - if: matrix.os == 'macos-latest' |
57 | | - run: | |
58 | | - echo "CHROME_BIN=${{ steps.setup-chrome.outputs.chrome-path }}" >> "$GITHUB_ENV" |
59 | | - echo "EDGE_BIN=/Users/runner/hostedtoolcache/msedge/stable/x64/Contents/MacOS/Microsoft Edge" >> "$GITHUB_ENV" |
60 | | - echo "FF_BIN=/Users/runner/hostedtoolcache/firefox/latest/x64/Contents/MacOS/firefox" >> "$GITHUB_ENV" |
61 | | - - name: Set ENV Linux |
62 | | - if: matrix.os == 'ubuntu-latest' |
63 | | - run: | |
64 | | - echo "CHROME_BIN=${{ steps.setup-chrome.outputs.chrome-path }}" >> "$GITHUB_ENV" |
65 | | - echo "EDGE_BIN=/opt/hostedtoolcache/msedge/stable/x64/msedge" >> "$GITHUB_ENV" |
66 | | - echo "FF_BIN=/opt/hostedtoolcache/firefox/latest/x64/firefox" >> "$GITHUB_ENV" |
| 33 | + uses: actions/checkout@v5 |
67 | 34 | - name: Remove driver directories Windows |
68 | | - if: matrix.os == 'windows-latest' |
| 35 | + if: matrix.os == 'windows' |
69 | 36 | run: | |
70 | 37 | rm "$env:ChromeWebDriver" -r -v |
71 | 38 | rm "$env:EdgeWebDriver" -r -v |
72 | 39 | rm "$env:GeckoWebDriver" -r -v |
73 | 40 | - name: Remove driver directories Non-Windows |
74 | | - if: matrix.os != 'windows-latest' |
| 41 | + if: matrix.os != 'windows' |
75 | 42 | run: | |
76 | 43 | sudo rm -rf $CHROMEWEBDRIVER $EDGEWEBDRIVER $GECKOWEBDRIVER |
77 | 44 | - name: Start Xvfb |
78 | | - if: matrix.os == 'ubuntu-latest' |
| 45 | + if: matrix.os == 'ubuntu' |
79 | 46 | run: Xvfb :99 & |
| 47 | + - name: Setup Node Stable |
| 48 | + if: matrix.release == 'stable' |
| 49 | + uses: actions/setup-node@v4 |
| 50 | + with: |
| 51 | + node-version: '22.x' |
| 52 | + - name: Setup Node Nightly |
| 53 | + if: matrix.release == 'nightly' |
| 54 | + uses: actions/setup-node@v4 |
| 55 | + with: |
| 56 | + node-version: '22.x' |
| 57 | + registry-url: 'https://npm.pkg.github.com' |
| 58 | + - name: Use Nightly package.json in Ubuntu/macOS |
| 59 | + if: matrix.release == 'nightly' && matrix.os != 'windows' |
| 60 | + run: |
| 61 | + | |
| 62 | + pip install -r ./scripts/requirements.txt |
| 63 | + latest_nightly=$(python ./scripts/latest-nightly-version.py npm selenium-webdriver) |
| 64 | + echo $latest_nightly |
| 65 | + npm install --prefix ./examples/javascript --save selenium-webdriver@npm:@seleniumhq/selenium-webdriver@$latest_nightly |
| 66 | + env: |
| 67 | + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 68 | + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 69 | + - name: Use Nightly package.json in Windows |
| 70 | + if: matrix.release == 'nightly' && matrix.os == 'windows' |
| 71 | + run: |
| 72 | + | |
| 73 | + pip install -r ./scripts/requirements.txt |
| 74 | + $latest_nightly = python ./scripts/latest-nightly-version.py npm selenium-webdriver |
| 75 | + npm install --prefix ./examples/javascript --save selenium-webdriver@npm:@seleniumhq/selenium-webdriver@$latest_nightly |
| 76 | + env: |
| 77 | + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 78 | + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
80 | 79 | - name: Install Requirements |
81 | 80 | working-directory: ./examples/javascript |
82 | 81 | run: npm install |
| 82 | + env: |
| 83 | + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
83 | 84 | - name: Run tests |
84 | | - uses: nick-invision/retry@v2.8.3 |
| 85 | + uses: nick-invision/retry@v3.0.2 |
85 | 86 | with: |
86 | | - timeout_minutes: 20 |
87 | | - max_attempts: 3 |
| 87 | + timeout_minutes: 40 |
| 88 | + max_attempts: 2 |
88 | 89 | command: | |
89 | 90 | cd examples/javascript |
90 | 91 | npm test |
0 commit comments