Skip to content

fix: show_offcanvas() accepts a string id and tag content (#2450) #534

fix: show_offcanvas() accepts a string id and tag content (#2450)

fix: show_offcanvas() accepts a string id and tag content (#2450) #534

Workflow file for this run

name: Run deploy tests
on:
workflow_dispatch:
push:
branches: ["main", "rc-*", "deploy-**"]
jobs:
playwright-deploys:
# Only allow one `playwright-deploys` job to run at a time. (Independent of branch / PR)
# Only one is allowed to run at a time because it is deploying to the same server location.
concurrency: playwright-deploys-${{ matrix.config.name }}
runs-on: ${{ matrix.os }}
name: ${{ matrix.config.name }}
# `packages: write` lets GITHUB_TOKEN push the Playwright image to GHCR
# (the lazy pull-through cache in setup-playwright-remote). Job-level
# permissions replace the workflow-level grant, so restate `contents: read`.
permissions:
contents: read
packages: write
strategy:
matrix:
# Matches the Python version available in the Connect image
python-version: ["3.14"]
os: [ubuntu-latest]
config:
# Released Connect, shiny, and rsconnect
- name: "pypi-shiny-rsconnect-local-connect"
pypi_shiny: true
pypi_rsconnect: true
base_test_dir: "./tests/playwright/deploys/express-page_sidebar"
app_name: "pypi-shiny-rsconnect"
# Released Connect and shiny; development rsconnect
- name: "pypi-shiny-dev-rsconnect-local-connect"
pypi_shiny: true
pypi_rsconnect: false
base_test_dir: "./tests/playwright/deploys/express-page_sidebar"
app_name: "pypi-shiny-dev-rsconnect"
# GitHub shiny v1.0.0 - test if github packages can be installed
# Released Connect; development rsconnect
- name: "github-shiny-dev-rsconnect-local-connect"
github_shiny: true
pypi_shiny: false
pypi_rsconnect: false
base_test_dir: "./tests/playwright/deploys/express-page_sidebar"
app_name: "pypi-shiny-dev-rsconnect"
# Released Connect; development shiny and rsconnect
- name: "dev-shiny-rsconnect-local-connect"
pypi_shiny: false
pypi_rsconnect: false
base_test_dir: "./tests/playwright/deploys"
app_name: "express_page_sidebar"
fail-fast: false
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Setup py-shiny
uses: ./.github/py-shiny/setup
with:
python-version: ${{ matrix.python-version }}
- name: Install pypi shiny and htmltools (uninstall GitHub versions)
if: ${{ matrix.config.pypi_shiny }}
run: |
uv pip uninstall shiny htmltools
uv pip install shiny htmltools
- name: Install GitHub shiny@v1.4.0 and htmltools@v0.7.0 (uninstall PyPI versions)
if: ${{ matrix.config.github_shiny }}
run: |
uv pip uninstall shiny htmltools
uv pip install "htmltools @ git+https://github.com/posit-dev/py-htmltools.git@v0.7.0" "shiny @ git+https://github.com/posit-dev/py-shiny.git@v1.4.0"
- name: Install rsconnect (PyPI)
if: ${{ matrix.config.pypi_rsconnect }}
run: |
uv pip install rsconnect
- name: Install rsconnect (GitHub)
if: ${{ ! matrix.config.pypi_rsconnect }}
run: |
make ci-install-rsconnect
- name: Setup remote Playwright
uses: ./.github/py-shiny/setup-playwright-remote
- name: Test that deployable example apps work
timeout-minutes: 5 # ~10s locally
env:
DEPLOY_APPS: "false"
run: |
make playwright-deploys TEST_FILE="${{ matrix.config.base_test_dir }} -vv"
- name: Deploy apps and run tests with local Connect
uses: posit-dev/with-connect@main
env:
UV_PYTHON: "3.13"
DEPLOY_APPS: "true"
EXPRESS_PAGE_SIDEBAR_NAME: "${{ matrix.config.app_name }}"
DEPLOY_GITHUB_REQUIREMENTS_TXT: "${{ !matrix.config.pypi_shiny }}"
timeout-minutes: 30
# Given we are waiting for external servers to finish,
# we can have many local processes waiting for deployment to finish
with:
license: "${{ secrets.CONNECT_LICENSE_FILE }}"
command: |
make playwright-deploys TEST_FILE="${{ matrix.config.base_test_dir }} -vv --numprocesses 12"
# - uses: actions/upload-artifact@v4
# if: failure()
# with:
# name: "playright-deploys-${{ matrix.os }}-${{ matrix.python-version }}-results"
# path: test-results/
# retention-days: 5