Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
7fc85ad
Use `kebab` style arg
schloerke Jul 22, 2024
63923bf
Move playwright tests from `pytest.yaml` to `end-to-end.yaml`
schloerke Jul 22, 2024
3d8ef6e
Reduce jobs created if status is draft. Test full
schloerke Jul 22, 2024
4a6281f
Update end-to-end.yaml
schloerke Jul 22, 2024
a2e1a71
bash quote typo
schloerke Jul 22, 2024
e32b840
Actually test on os value
schloerke Jul 22, 2024
5260d98
Add os value support
schloerke Jul 22, 2024
2dde152
debug if inline if values are converted to boolean or the value is kept
schloerke Jul 22, 2024
0ba8293
Try using exclusion approach to avoid needing config pre-job
schloerke Jul 22, 2024
6aea30d
Update end-to-end.yaml
schloerke Jul 22, 2024
39512c8
Exclude macos and windows and py 3.9, 3.10, 3.11 on draft
schloerke Jul 22, 2024
8296477
Update pytest.yaml
schloerke Jul 22, 2024
a86e385
Try installing packags via `uv` and not `pip`
schloerke Jul 22, 2024
2ad4c03
Add a virtual environment and enable it before calling `make` commands
schloerke Jul 22, 2024
5118128
Update end-to-end.yaml
schloerke Jul 22, 2024
f3dfadf
Update action.yaml
schloerke Jul 22, 2024
617c229
Call `make` commands directly
schloerke Jul 22, 2024
5afc91e
Update action.yaml
schloerke Jul 22, 2024
4be84fb
Try activating and calling make
schloerke Jul 22, 2024
daddcfe
Update action.yaml
schloerke Jul 22, 2024
af6af50
Update action.yaml
schloerke Jul 22, 2024
bf36cd3
Update action.yaml
schloerke Jul 22, 2024
b4f72a6
Use `venv` folder for docs
schloerke Jul 22, 2024
5a709ae
Update action.yaml
schloerke Jul 22, 2024
731fd72
Update action.yaml
schloerke Jul 22, 2024
b452d47
Use `. venv/bin/activate` syntax
schloerke Jul 22, 2024
1caa908
Do not require make playwright-deploys to install rsconnect
schloerke Jul 22, 2024
74ae8ad
`rsconnect_python` not `rsconnect`
schloerke Jul 22, 2024
09ef1ef
Try with 4 processes
schloerke Jul 22, 2024
1bf23b3
Update end-to-end.yaml
schloerke Jul 22, 2024
98a4359
Update playwright.yaml
schloerke Jul 22, 2024
a011eab
Add types for pull request
schloerke Jul 22, 2024
807792a
Move playwright tests back into `pytest.yaml`
schloerke Jul 22, 2024
4da66ba
Do not run playwright on release
schloerke Jul 22, 2024
00d65f2
Test using bash shell (windows)
schloerke Jul 22, 2024
94c6dbc
Use windows friendly commands
schloerke Jul 22, 2024
06cbb1b
Updated inline if syntax
schloerke Jul 22, 2024
4673919
Windows path update
schloerke Jul 23, 2024
c71e159
Allow uv to use the system Python by default
schloerke Jul 23, 2024
20e1086
Clean up
schloerke Jul 23, 2024
02b9c24
Skip tests that fail on windows due to temp file ownership issues
schloerke Jul 23, 2024
fd6e280
Relocate `skip_on_windows`
schloerke Jul 23, 2024
ca0ce73
Remove unnecessary rsconnect install
schloerke Jul 23, 2024
a36cfdb
Work here?
schloerke Jul 23, 2024
1c4ade1
isort
schloerke Jul 23, 2024
bac659a
Move commands into make files; Remove remaining merge queue commands
schloerke Jul 23, 2024
419a3eb
Update Makefile
schloerke Jul 23, 2024
36c41a8
ci: Adjust pytest verbosity output levels (#1553)
schloerke Jul 23, 2024
9431b94
Try using temp dir for better windows support
schloerke Jul 23, 2024
b8eac1e
Update test_express_ui.py
schloerke Jul 23, 2024
10f4ebe
Add test to discourage usage of `tempfile.NamedTemporaryFile()`
schloerke Jul 23, 2024
dd2593e
Allow for windows testing to possibly produce errors
schloerke Jul 23, 2024
493a647
Update test_named_temporary_file.py
schloerke Jul 23, 2024
4f4f5f6
Use windows friendly back arrow
schloerke Jul 23, 2024
4986379
Revert "Allow for windows testing to possibly produce errors"
schloerke Jul 23, 2024
8fac2e5
Assert all lines are seen and files are processed
schloerke Jul 24, 2024
a3c8a6e
Update test_named_temporary_file.py
schloerke Jul 24, 2024
d9c86a0
Discard changes to shiny/_template_utils.py
schloerke Jul 24, 2024
11a9ff4
Apply suggestions from code review
schloerke Jul 24, 2024
1eeb7ff
Update Makefile
schloerke Jul 24, 2024
8607638
Do not build site except for `main` or branches that start with `docs-`
schloerke Jul 24, 2024
c2174fc
Add skip to failing test (unknown reasons)
schloerke Jul 24, 2024
d7a00ac
Disable webkit on python 3.8, 3.9
schloerke Jul 24, 2024
74d9f18
Add skip to another failing test (unknown reasons)
schloerke Jul 24, 2024
0372f97
Add skip to another failing test (unknown reasons)
schloerke Jul 24, 2024
923115c
Reenable tests
schloerke Jul 24, 2024
8a50dc3
Capture all console messages and display them on failed test
schloerke Jul 24, 2024
681ef40
Add a screenshot for failed tests; Set output dir to `test-results`
schloerke Jul 24, 2024
8ea81d9
Disable sneaky page meant for speedup and use playwright page for vid…
schloerke Jul 24, 2024
bb73e50
Use `page_chat` to slow down default wait time across board
schloerke Jul 24, 2024
43b4a27
Update test_chat_append_user_msg.py
schloerke Jul 24, 2024
df2a0cb
Add a `wait_for_idle_app()` at beginning of each chat test
schloerke Jul 24, 2024
baf093a
Try waiting for shiny elements to have been bound before waiting for …
schloerke Jul 24, 2024
17fcb22
Rather than a function, just set the timeout variable directly
schloerke Jul 24, 2024
a73a00e
Allow slower execution time; Do not use 4 processes
schloerke Jul 25, 2024
1f436cc
Disable playwright-diagnostics for webkit as it's VERY slow
schloerke Jul 25, 2024
1dfc308
Update action.yaml
schloerke Jul 25, 2024
8738c85
Wait for chat apps to perform initial load before attempting to type
schloerke Jul 25, 2024
e9e6917
Add reruns for failed tests on CI
schloerke Jul 25, 2024
727d86b
Add back page size reset and console monitoring
schloerke Jul 25, 2024
2be3239
Trying to keep memory usage down. Do not keep args
schloerke Jul 25, 2024
8924acd
lint
schloerke Jul 25, 2024
679ad95
Do not record on firefox
schloerke Jul 25, 2024
7eabc3b
Only record console messages on chromium
schloerke Jul 25, 2024
6c1e9b5
Update pytest.yaml
schloerke Jul 25, 2024
f29deb0
Try older versions of ubuntu
schloerke Jul 25, 2024
ebaa5e1
Rearrange diagnostic arg locations to avoid needing to override values
schloerke Jul 25, 2024
2efa0b2
Try not using custom page object
schloerke Jul 25, 2024
1d9e1e2
Revert ubuntu change
schloerke Jul 25, 2024
43947ae
Update pytest.yaml
schloerke Jul 25, 2024
1d5a5c6
Remove custom page object with browser console message tracking
schloerke Jul 25, 2024
11ce472
lints
schloerke Jul 25, 2024
ba436a3
More timeouts settings
schloerke Jul 25, 2024
5bb1577
Remove unnecessary `shell: bash`
schloerke Jul 26, 2024
1e08f8f
Clean up file
schloerke Jul 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 40 additions & 2 deletions .github/py-shiny/pytest-browsers/action.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,59 @@
name: 'Custom merge queue browsers'
description: 'Trim down pytest browsers for any github event other than merge_group.'
name: 'Trim down pytest browsers'
description: 'Trim down pytest browsers so the browser tabs are not shut down between tests, speeding up testing.'
inputs:
browser:
description: 'Browser to use for testing. Currently supports `chromium`, `firefox`, and `webkit`.'
required: false
default: ''
all-browsers:
description: 'Force all pytest browsers to used when testing'
required: false
default: 'false'
disable-playwright-diagnostics:
description: 'Disable playwright diagnostics: tracing, video, screenshot'
required: false
default: 'true'
outputs:
browsers:
description: 'pytest browsers to use'
value: ${{ steps.browsers.outputs.browsers }}
has-playwright-diagnostics:
description: 'Whether playwright diagnostics have been enabled'
value: ${{ steps.browsers.outputs.has-playwright-diagnostics }}
playwright-diagnostic-args:
description: 'Args to supply to `make playwright` like commands.'
value: ${{ steps.browsers.outputs.playwright-diagnostic-args }}
runs:
using: "composite"
steps:
- name: Determine browsers to use
shell: bash
id: browsers
run: |
# Determine which browsers to use

if [ "${{ inputs.disable-playwright-diagnostics }}" == "true" ]; then
echo "Disabling playwright diagnostics!"
echo 'has-playwright-diagnostics=false' >> "$GITHUB_OUTPUT"
echo 'playwright-diagnostic-args=--tracing off --video off --screenshot off' >> "$GITHUB_OUTPUT"
else
echo "Using playwright diagnostics!"
echo 'has-playwright-diagnostics=true' >> "$GITHUB_OUTPUT"
echo 'playwright-diagnostic-args=--tracing=retain-on-failure --video=retain-on-failure --screenshot=only-on-failure --full-page-screenshot --output=test-results' >> "$GITHUB_OUTPUT"
fi

if [ "${{ inputs.browser }}" != "" ]; then
BROWSER="${{ inputs.browser }}"

if [ "$BROWSER" == "chromium" ] || [ "$BROWSER" == "firefox" ] || [ "$BROWSER" == "webkit" ]; then
echo "Using custom browser $BROWSER !"
echo "browsers=PYTEST_BROWSERS=\"--browser $BROWSER\"" >> "$GITHUB_OUTPUT"
exit 0
fi
echo "Unknown browser: $BROWSER"
exit 1
fi

if [ "${{ inputs.all-browsers }}" == "true" ]; then
echo "Using all browsers!"
exit 0
Expand Down
28 changes: 15 additions & 13 deletions .github/py-shiny/setup/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,38 +12,40 @@ runs:
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}
# # Caching with pip only saves ~15 seconds. Not work risks of confusion.
# cache: 'pip'
# cache-dependency-path: |
# setup.cfg

- name: Upgrade pip
- name: Upgrade `pip`
shell: bash
run: python -m pip install --upgrade pip
run: |
python -m pip install --upgrade pip

- name: Pip list
- name: Install `uv`
shell: bash
run: |
pip install uv

# https://github.com/astral-sh/uv/blob/main/docs/guides/integration/github.md#using-uv-pip
- name: Allow uv to use the system Python by default
shell: bash
run: |
pip list
echo "UV_SYSTEM_PYTHON=1" >> $GITHUB_ENV

- name: Install dependencies
shell: bash
run: |
pip install https://github.com/rstudio/py-htmltools/tarball/main
make install-deps
make ci-install-deps

- name: Install
shell: bash
run: |
make install
make ci-install-wheel

- name: Install backports.tarfile
if: ${{ startsWith(inputs.python-version, '3.8') }}
shell: bash
run: |
pip install backports.tarfile
uv pip install backports.tarfile

- name: Pip list
shell: bash
run: |
pip list
uv pip list
35 changes: 15 additions & 20 deletions .github/workflows/build-docs.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
name: Build API docs and Shinylive for GitHub Pages

# Allow for `main` branch to build full website and deploy
# Allow branches that start with `docs-` to build full website, but not deploy
# Allow for PRs to build quartodoc only. (No shinylive, no site build, no deploy)

on:
workflow_dispatch:
push:
branches: ["main"]
branches: ["main", "docs-**"]
pull_request:
merge_group:

jobs:
build-docs:
Expand All @@ -18,14 +21,11 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
- name: Setup py-shiny
uses: ./.github/py-shiny/setup
with:
python-version: ${{ matrix.python-version }}

- name: Upgrade pip
run: python -m pip install --upgrade pip

# =====================================================
# API docs
# =====================================================
Expand All @@ -36,53 +36,48 @@ jobs:

- name: Install dependencies
run: |
cd docs
make ../venv
make deps
make ci-install-docs

- name: Run quartodoc
run: |
cd docs
make quartodoc
make docs-quartodoc

# =====================================================
# Shinylive
# =====================================================
- name: Check out shinylive
if: github.ref == 'refs/heads/main'
if: github.event_name != 'pull_request'
uses: actions/checkout@v4
with:
repository: rstudio/shinylive
ref: main
path: shinylive-repo

- name: Update shinylive's copy of shiny and htmltools
if: github.ref == 'refs/heads/main'
if: github.event_name != 'pull_request'
run: |
cd shinylive-repo
make submodules
make submodules-pull-shiny
make submodules-pull-htmltools

- name: Build shinylive
if: github.ref == 'refs/heads/main'
if: github.event_name != 'pull_request'
run: |
cd shinylive-repo
make all

- name: Use local build of shinylive for building docs
if: github.ref == 'refs/heads/main'
if: github.event_name != 'pull_request'
run: |
. venv/bin/activate
cd shinylive-repo
shinylive assets install-from-local ./build
cd shinylive-repo && shinylive assets install-from-local ./build

# =====================================================
# Build site
# =====================================================

- name: Build site
if: ${{ github.ref == 'refs/heads/main' || github.event_name == 'merge_group' || startsWith(github.head_ref, 'docs') }}
if: github.event_name != 'pull_request'
run: |
cd docs
make site
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/deploy-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Install rsconnect
run: |
make ci-install-rsconnect

- name: Test that deployable example apps work
timeout-minutes: 5 # ~10s locally
env:
Expand Down
Loading