Suggest user_plugin in demo to avoid Selenium dependency (#5262) #5585
This file contains hidden or 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: Run Tests | |
on: [push] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.sha }} | |
cancel-in-progress: true | |
jobs: | |
code-check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v5 | |
- name: set up Poetry | |
uses: abatilo/actions-poetry@v4 | |
- name: set up Python | |
uses: actions/setup-python@v6 | |
with: | |
python-version: "3.9" | |
cache: "poetry" | |
- name: install dependencies | |
run: poetry install --all-extras --with dev | |
- name: pre-commit, mypy & pylint | |
run: | | |
poetry run pre-commit run --all-files | |
poetry run mypy ./nicegui --non-interactive | |
poetry run pylint ./nicegui | |
test: | |
strategy: | |
matrix: | |
python: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] | |
fail-fast: false | |
runs-on: ubuntu-latest | |
timeout-minutes: 40 | |
steps: | |
- uses: actions/checkout@v5 | |
- name: set up Poetry | |
uses: abatilo/actions-poetry@v4 | |
- name: set up Python | |
uses: actions/setup-python@v6 | |
with: | |
python-version: ${{ matrix.python }} | |
cache: "poetry" | |
- name: install dependencies | |
run: | | |
set -x | |
poetry install --all-extras --with dev | |
- name: setup chromedriver | |
uses: nanasess/setup-chromedriver@v2.3.0 | |
- name: pytest | |
run: poetry run pytest | |
- name: Upload failed screenshots | |
if: failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: screenshots-${{ matrix.python }} | |
path: screenshots/*.failed.png | |
retention-days: 14 | |
- name: install test startup dependencies | |
run: | | |
set -x | |
# install packages to run the examples | |
poetry run pip install opencv-python opencv-contrib-python-headless httpx isort replicate langchain openai simpy tortoise-orm | |
- name: test startup | |
run: poetry run ./test_startup.sh | |
- name: restore dependencies for effective caching | |
if: always() | |
run: | | |
set -x | |
poetry install --all-extras --with dev | |
slack: | |
needs: | |
- test | |
- code-check | |
if: always() # also execute when test fail | |
runs-on: ubuntu-latest | |
steps: | |
- name: Determine if we need to notify | |
uses: Jimdo/should-i-notify-action@main | |
id: should_notify | |
with: | |
needs_context: ${{ toJson(needs) }} | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Check if secret exists | |
id: check_secret | |
env: | |
SLACK_WEBHOOK: ${{ secrets.SLACK_ROBOTICS_CI_WEBHOOK }} | |
run: | | |
if [[ -z "$SLACK_WEBHOOK" ]]; then | |
echo "slack_webhook_exists=false" >> $GITHUB_ENV | |
else | |
echo "slack_webhook_exists=true" >> $GITHUB_ENV | |
fi | |
- name: Slack workflow notification | |
if: steps.should_notify.outputs.should_send_message == 'yes' && env.slack_webhook_exists == 'true' | |
uses: Gamesight/slack-workflow-status@master | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
slack_webhook_url: ${{ secrets.SLACK_ROBOTICS_CI_WEBHOOK }} | |
channel: "robotik-ci" | |
name: "NiceGUI" |