Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: add pytest-timeout in cli test #3482

Merged
merged 3 commits into from
Jan 17, 2025
Merged
Changes from 1 commit
Commits
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
Next Next commit
test: add pytest-timeout in cli test
mscolnick committed Jan 17, 2025
commit 5d18186ec881d2cfed5936510112a0ae94994fe1
31 changes: 13 additions & 18 deletions .github/workflows/test_cli.yaml
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: marimo
MARIMO_SKIP_UPDATE_CHECK: 1

UV_SYSTEM_PYTHON: 1
jobs:
changes:
runs-on: ubuntu-latest
@@ -103,24 +103,23 @@ jobs:
timeout-minutes: 10 # 2024-01-18 avg: 2.5m max: 4.5m
strategy:
matrix:
# TODO(akshayka): consider adding 3.8, 3.9
python-version: ['3.12']
os: [ubuntu-latest, macos-latest, windows-latest]

steps:
- name: 🛑 Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.12.1
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5

- name: 🐍 Setup uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
python-version: ${{ matrix.python-version }}
cache: 'pip'

- name: Install Python deps
run: |
python -m pip install --upgrade pip
pip install pytest pytest-asyncio nbformat
uv pip install pytest pytest-asyncio pytest-timeout nbformat
- name: Download wheel
uses: actions/download-artifact@v4
@@ -129,12 +128,12 @@ jobs:

- name: Install marimo
shell: bash
run: pip install marimo*whl
run: uv pip install marimo*whl

- name: Test CLI
shell: bash
run: |
pytest -v tests/_cli/test_cli* --maxfail=2
uv run pytest -v tests/_cli/test_cli* --maxfail=2
test_examples:
needs: [changes, build_wheel]
@@ -147,16 +146,12 @@ jobs:
- name: 🛑 Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.12.1
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip'

- name: 🐍 Setup uv
uses: yezz123/setup-uv@v4
uses: astral-sh/setup-uv@v5
with:
uv-venv: marimo-venv
enable-cache: true
python-version: 3.12

- name: Download wheel
uses: actions/download-artifact@v4
@@ -166,10 +161,10 @@ jobs:
- name: Install Python deps
run: |
uv pip install pytest pytest-asyncio
uv pip install ./marimo*whl
uv pip install marimo*whl
- name: Test examples
shell: bash
run: pytest -v -s tests/_smoke_tests/run_all.py
run: uv run pytest -v -s tests/_smoke_tests/run_all.py
# TODO(msconick) remove continue-on-error when all tests pass
continue-on-error: true