Skip to content
Merged
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
38 changes: 38 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,41 @@ jobs:
run: ruff check .
- name: Run ruff format
run: ruff format --check
run-e2e-tests:
name: Run E2E tests
needs: build-dists
permissions:
id-token: write
contents: read
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: [ "3.9", "3.10", "3.11", "3.12", "3.13" ]
os: [ ubuntu-latest, macOS-latest, windows-latest ]
if: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/main') || github.event_name == 'workflow_dispatch' }}
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- name: Download distributions
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16
with:
name: dists
path: dist/
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --find-links=dist azstoragetorch
python -m pip install pytest torchvision
- name: Azure login
uses: azure/login@6c251865b4e6290e7b78be643ea2d005bc51f69a
with:
client-id: ${{ secrets.AZURE_E2E_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_E2E_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_E2E_SUBSCRIPTION_ID }}
- name: Run tests
run: pytest tests/e2e
env:
AZSTORAGETORCH_STORAGE_ACCOUNT_NAME: ${{ secrets.AZURE_E2E_STORAGE_ACCOUNT_NAME }}
4 changes: 2 additions & 2 deletions tests/e2e/test_torch_serialize.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# --------------------------------------------------------------------------
import pytest
import torch
import torchvision.models

from azstoragetorch.io import BlobIO
from utils import random_resource_name
Expand All @@ -20,8 +21,7 @@ def torch_hub_cache(tmp_path_factory):

@pytest.fixture(scope="module")
def model():
model = torch.hub.load("pytorch/vision:v0.10.0", "resnet101", pretrained=False)
return model
return torchvision.models.resnet101()


@pytest.fixture(scope="module")
Expand Down