Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
110 changes: 110 additions & 0 deletions .github/workflows/wandb-compat.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
name: Wandb Compatibility Tests

# This workflow tests the wandb-to-pluto compatibility layer.
# It runs on manual trigger or when a maintainer comments /wandb on a PR.

on:
workflow_dispatch:
issue_comment:
types: [created]

jobs:
wandb-compatibility:
# Run on manual dispatch, or when someone comments /wandb on a PR
if: >
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'issue_comment' &&
github.event.issue.pull_request &&
contains(github.event.comment.body, '/wandb'))
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
poetry-version: ["2.1.1"]

steps:
- name: React to comment
if: github.event_name == 'issue_comment'
uses: actions/github-script@v7
with:
script: |
await github.rest.reactions.createForIssueComment({
owner: context.repo.owner,
repo: context.repo.repo,
comment_id: context.payload.comment.id,
content: 'rocket'
});

- name: Get PR head ref
if: github.event_name == 'issue_comment'
id: pr
uses: actions/github-script@v7
with:
script: |
const pr = await github.rest.pulls.get({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.issue.number
});
core.setOutput('ref', pr.data.head.ref);
core.setOutput('sha', pr.data.head.sha);

- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event_name == 'issue_comment' && steps.pr.outputs.ref || '' }}

- name: "Setup Python, Poetry and Dependencies"
uses: packetcoders/action-setup-cache-python-poetry@v1.2.0
with:
python-version: ${{ matrix.python-version }}
poetry-version: ${{ matrix.poetry-version }}
install-args: "--with dev"

- name: Install dependencies
run: |
set -euox pipefail
rm -rf .venv
poetry install --with dev --extras full

- name: Run wandb compatibility unit tests
run: |
set -euox pipefail
poetry run pytest tests/test_wandb_compat.py -v -rs -k "not test_table_from_dataframe"

- name: Run wandb env var fallback tests
run: |
set -euox pipefail
poetry run pytest tests/test_env_vars.py::TestWANDBApiKeyFallback -v -rs

- name: Run live pluto shim parity test
env:
PLUTO_API_TOKEN: ${{ secrets.MLOP_API_TOKEN }}
run: |
set -euox pipefail
poetry run pytest tests/test_wandb_visual_parity.py::TestPlutoShimSide -v -rs -s

- name: Report test results
if: always()
run: |
echo "Wandb compatibility tests completed"
echo "Python version: ${{ matrix.python-version }}"
echo "Status: ${{ job.status }}"

wandb-compat-status:
runs-on: ubuntu-latest
needs: [wandb-compatibility]
if: always() && github.event_name == 'issue_comment'
steps:
- name: Comment result on PR
uses: actions/github-script@v7
with:
script: |
const status = '${{ needs.wandb-compatibility.result }}';
const icon = status === 'success' ? '✅' : '❌';
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body: `${icon} Wandb compatibility tests: **${status}**`
});
Loading
Loading