feat: Create notebook copies #5780
Workflow file for this run
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
name: playwright | |
on: | |
push: | |
branches: [main] | |
pull_request: {} | |
env: | |
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | |
TURBO_TEAM: marimo | |
MARIMO_SKIP_UPDATE_CHECK: 1 | |
jobs: | |
test: | |
timeout-minutes: 16 | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
env: | |
NODE_ENV: test | |
DEBUG: "pw:webserver" | |
steps: | |
- name: 🛑 Cancel Previous Runs | |
uses: styfle/[email protected] | |
- name: ⬇️ Checkout repo | |
uses: actions/checkout@v4 | |
- name: Write TOML | |
run: | | |
echo "[experimental]" > .marimo.toml | |
echo "layouts=true" >> .marimo.toml | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- name: ⎔ Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: "pnpm" | |
cache-dependency-path: "**/pnpm-lock.yaml" | |
- uses: turbocache-build/turbocache-action@v1 | |
- name: 📦 Build frontend | |
run: make fe | |
- name: 🐍 Setup Python 3.10 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
cache: "pip" | |
# We tried to add uv, but marimo is unable to | |
# start when installed. | |
# - name: 🐍 Setup uv | |
# uses: yezz123/setup-uv@v4 | |
# with: | |
# uv-venv: marimo-venv | |
- name: 🐍 Install marimo | |
run: | | |
python -m pip install --upgrade pip | |
pip install . | |
echo "MARIMO_VERSION=$(marimo --version)" >> $GITHUB_ENV | |
- name: 🎭 Get installed Playwright version | |
id: playwright-version | |
working-directory: ./frontend | |
run: | | |
PLAYWRIGHT_VERSION=$(pnpm ls @playwright/test | grep @playwright | sed 's/.*@//') | |
echo "Playwright's Version: $PLAYWRIGHT_VERSION" | |
echo "PLAYWRIGHT_VERSION=$PLAYWRIGHT_VERSION" >> $GITHUB_ENV | |
- name: 📦 Cache playwright binaries | |
uses: actions/cache@v4 | |
id: playwright-cache | |
with: | |
path: | | |
~/.cache/ms-playwright | |
key: ${{ runner.os }}-playwright-2-${{ env.PLAYWRIGHT_VERSION }} | |
- name: 📥 Install Playwright Browsers | |
working-directory: ./frontend | |
if: steps.playwright-cache.outputs.cache-hit != 'true' | |
run: npx playwright install chromium webkit --with-deps | |
- name: 🎭 Run Playwright tests | |
working-directory: ./frontend | |
run: npx playwright test | |
# TODO(msconick) remove continue-on-error when all tests pass | |
continue-on-error: true | |
env: | |
VITE_MARIMO_VERSION: ${{ env.MARIMO_VERSION }} | |
- name: ☁️ Google Auth | |
uses: google-github-actions/auth@v1 | |
# Skip on forks | |
if: github.event.pull_request.head.repo.organization == 'marimo-team' | |
with: | |
credentials_json: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} | |
- name: 🌲 Get branch name | |
id: branch-name | |
uses: tj-actions/branch-names@v7 | |
- name: 📦 Upload to bucket (PR) | |
uses: google-github-actions/upload-cloud-storage@v1 | |
# Only on PRs and not forks | |
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.organization == 'marimo-team' | |
with: | |
destination: marimo-oss-visual-snapshots/branches/${{ steps.branch-name.outputs.current_branch }} | |
path: frontend/e2e-tests/screenshots | |
- name: 📦 Upload to bucket (main) | |
uses: google-github-actions/upload-cloud-storage@v1 | |
# Only on main branch and not forks | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && github.event.pull_request.head.repo.organization == 'marimo-team' | |
with: | |
destination: marimo-oss-visual-snapshots/main | |
path: frontend/e2e-tests/screenshots | |
- name: 📊 Upload report | |
uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: playwright-report | |
path: frontend/playwright-report/ | |
retention-days: 1 |