Bump @types/react from 18.2.48 to 18.2.53 #8473
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
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Continuous integration | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
schedule: | |
- cron: '15 10 * * *' | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ "ubuntu-latest", "windows-latest" ] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20.x | |
cache: 'npm' | |
- name: Install nodejs dependencies | |
env: | |
PLAYWRIGHT_BROWSERS_PATH: 0 | |
run: | | |
npm ci | |
npx playwright install --with-deps | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.9 | |
cache: 'pip' | |
- name: Install python dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install wheel | |
pip install -r Browser/dev-requirements.txt | |
- name: Build Protos and check with tsc | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
inv node-build | |
python -m Browser.gen_stub | |
- name: Build test app | |
run: | | |
inv create-test-app | |
- name: Create Distributable Package | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
inv docs | |
inv create-package | |
- uses: actions/upload-artifact@v4 | |
if: matrix.os == 'ubuntu-latest' | |
with: | |
name: rfbrowser-wheel | |
path: dist/robotframework_browser-*-py3-none-any.whl | |
- name: Package demoapp | |
run: | | |
inv demo-app | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: demoapp-${{ matrix.os }} | |
path: zip_results/demoapp | |
testing: | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 30 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: windows-latest | |
python-version: "3.9" | |
node-version: 18.x | |
shard: 1 | |
- os: windows-latest | |
python-version: "3.12" | |
node-version: 20.x | |
shard: 2 | |
- os: ubuntu-latest | |
python-version: "3.10" | |
node-version: 18.x | |
shard: 3 | |
- os: ubuntu-latest | |
python-version: "3.11" | |
node-version: 20.x | |
shard: 4 | |
- os: windows-latest | |
python-version: "3.8" | |
node-version: 20.x | |
shard: 1 | |
- os: ubuntu-latest | |
python-version: "3.10" | |
node-version: 18.x | |
shard: 2 | |
- os: ubuntu-latest | |
python-version: "3.8" | |
node-version: 18.x | |
shard: 3 | |
- os: ubuntu-latest | |
python-version: "3.9" | |
node-version: 20.x | |
shard: 4 | |
- os: ubuntu-latest | |
python-version: "3.11" | |
node-version: 20.x | |
shard: 1 | |
- os: macos-latest | |
python-version: "3.8" | |
node-version: 20.x | |
shard: 1 | |
- os: macos-latest | |
python-version: "3.9" | |
node-version: 20.x | |
shard: 2 | |
- os: macos-latest | |
python-version: "3.10" | |
node-version: 20.x | |
shard: 3 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'npm' | |
- name: Install nodejs dependencies | |
env: | |
PLAYWRIGHT_BROWSERS_PATH: 0 | |
run: | | |
npm ci | |
npx playwright install --with-deps | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'pip' | |
- name: Install python dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install wheel | |
pip install -r Browser/dev-requirements.txt | |
- name: Build Protos and check with tsc | |
run: | | |
inv node-build | |
python -m Browser.gen_stub | |
- name: Check types with mypy on Linux | |
if: matrix.os == 'ubuntu-latest' && matrix.shard == 1 && matrix.python-version != '3.10' | |
run: | | |
inv lint-python | |
- name: Lint atest | |
if: matrix.shard == 1 | |
run: | | |
inv lint-robot | |
- name: Lint node | |
if: matrix.shard == 1 | |
run: | | |
inv lint-node | |
- name: Check with ruff | |
run: | | |
ruff Browser | |
- name: Build test app | |
run: | | |
inv create-test-app | |
- name: Start xvfb on Linux | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
export DISPLAY=:99.0 | |
Xvfb -ac :99 -screen 0 1280x1024x16 > /dev/null 2>&1 & | |
- name: Run pytests | |
if: matrix.shard == 1 | |
run: | | |
invoke utest | |
- name: Run Robot Framework tests on linux | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
xvfb-run --auto-servernum inv atest --shard ${{ matrix.shard }}/4 -z true | |
- name: Run Robot Framework tests on Windows | |
if: matrix.os == 'windows-latest' | |
run: | | |
inv atest --shard ${{ matrix.shard }}/4 -z true | |
- name: Run Robot Framework tests on macOS | |
if: matrix.os == 'macos-latest' | |
run: | | |
inv atest --shard ${{ matrix.shard }}/4 -z true | |
- uses: actions/upload-artifact@v4 | |
if: ${{ always() }} | |
with: | |
name: Test results-${{ matrix.os }}-${{ matrix.shard }}-${{ matrix.python-version }}-${{ matrix.node-version }} | |
path: zip_results/output | |
- name: Create Distributable Package | |
run: | | |
inv docs | |
inv create-package | |
- name: Artifacts download for flaky test analysis | |
if: ${{ failure() }} | |
# flaky-tests-detection and failures-analysis install is here because dependencies takes long | |
# time to install and not needed for the test-install | |
run : | | |
pip install flaky-tests-detection failures-analysis requests python-dateutil | |
python download_file.py --project MarketSquare --repo robotframework-browser --token ${{ secrets.GITHUB_TOKEN }} | |
inv copy-xunit | |
- name: Flaky tests detection | |
if: ${{ failure() }} | |
run: | | |
flaky --junit-files=flip_rate/xunit/ --grouping-option=days --window-size=2 --window-count=5 --top-n=10 | |
- name: Failures analysis | |
if: ${{ failure() }} | |
run: | | |
failures-analysis ./flip_rate/xunit/ | |
test-install: | |
needs: build | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [windows-latest, ubuntu-latest] | |
python-version: [3.8, 3.11] | |
node-version: [18.x, 20.x] | |
exclude: | |
- python-version: 3.8 | |
node-version: 20.x | |
- os: windows-latest | |
python-version: 3.8 | |
- os: windows-latest | |
node-version: 20.x | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download package for install testing | |
uses: actions/download-artifact@v4 | |
with: | |
name: rfbrowser-wheel | |
- name: Download package for install testing | |
uses: actions/download-artifact@v4 | |
with: | |
name: demoapp-${{ matrix.os }} | |
path: zip_results/demoapp | |
- name: Unzip demoapp in linux or MacOS | |
if: matrix.os != 'windows-latest' | |
run: | | |
ls -l zip_results/demoapp | |
unzip -o zip_results/demoapp/demo-app-linux.zip | |
- name: Unzip demoapp in windows | |
if: matrix.os == 'windows-latest' | |
run: | | |
dir zip_results/demoapp | |
tar -xf zip_results/demoapp/demo-app-win32.zip | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'npm' | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'pip' | |
- name: Install Robot Framework Browser on unix-like | |
run: | | |
pip install ./robotframework_browser-*-py3-none-any.whl | |
if: matrix.os != 'windows-latest' | |
- name: Install Robot Framework Browser on windows | |
run: | | |
pip install (gci *.whl) | |
if: matrix.os == 'windows-latest' | |
- name: Install node deps and python deps for test running | |
run: | | |
rfbrowser init | |
pip install wheel | |
pip install -r Browser/dev-requirements.txt | |
- name: Test on unix-like os - serial mode | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
echo ${{ matrix.os }} | |
rm -rf Browser | |
export DISPLAY=:99.0 | |
Xvfb -ac :99 -screen 0 1280x1024x16 > /dev/null 2>&1 & | |
xvfb-run --auto-servernum invoke atest-robot --smoke | |
- name: Run Robot Framework tests on windows or macOS | |
if: ${{ matrix.os != 'ubuntu-latest' }} | |
run: | | |
echo ${{ matrix.os }} | |
Remove-Item -Path .\Browser -Force -Recurse | |
invoke atest-robot --smoke | |
- name: Artifacts download for flaky test analysis | |
if: ${{ failure() }} | |
# flaky-tests-detection and failures-analysis install is here because dependencies takes long | |
# time to install and not needed for the test-install | |
run: | | |
pip install flaky-tests-detection failures-analysis | |
python download_file.py --project MarketSquare --repo robotframework-browser --token ${{ secrets.GITHUB_TOKEN }} | |
inv copy-xunit | |
- name: Flaky tests detection | |
if: ${{ failure() }} | |
run: | | |
flaky --junit-files=flip_rate/xunit/ --grouping-option=days --window-size=2 --window-count=5 --top-n=10 | |
- name: Failures analysis | |
if: ${{ failure() }} | |
run: | | |
failures-analysis ./flip_rate/xunit/ | |
- name: Uninstall on Linux or MacOS | |
if: ${{ matrix.os != 'windows-latest' }} | |
run: | | |
rfbrowser clean-node | |
pip uninstall --yes robotframework-browser | |
- uses: actions/upload-artifact@v4 | |
if: ${{ always() }} | |
with: | |
name: ${{ matrix.os }} ${{ matrix.python-version }} ${{ matrix.node-version }} Clean install results | |
path: atest/output |