Added additional samples #185
Workflow file for this run
This file contains hidden or 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: Run CI | |
on: [push, pull_request, workflow_call] | |
permissions: | |
contents: read | |
jobs: | |
build-dists: | |
name: Build distributions | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 | |
with: | |
python-version: 3.12 | |
- name: Install dependencies | |
run: python -m pip install -r requirements-dev.txt | |
- name: Build distributions | |
run: python -m build --no-isolation | |
- name: Upload distributions | |
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 | |
with: | |
name: dists | |
path: dist/ | |
run-tests: | |
name: Run tests | |
needs: build-dists | |
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 ] | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
- name: Download distributions | |
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 | |
with: | |
name: dists | |
path: dist/ | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install -r requirements-dev.txt | |
python -m pip install --no-index --find-links=dist azstoragetorch | |
- name: Run tests | |
run: pytest tests/unit | |
check-sdist: | |
name: Check sdist | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 | |
with: | |
python-version: 3.12 | |
- name: Install dependencies | |
run: python -m pip install -r requirements-dev.txt | |
- name: Run check-manifest | |
run: check-manifest --no-build-isolation | |
run-ruff: | |
name: Run ruff | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 | |
with: | |
python-version: 3.12 | |
- name: Install dependencies | |
run: python -m pip install -r requirements-dev.txt | |
- name: Run ruff check | |
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@11bd71901bbe5b1630ceea73d27597364c9af683 | |
- name: Download distributions | |
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 | |
with: | |
name: dists | |
path: dist/ | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 | |
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@a457da9ea143d694b1b9c7c869ebb04ebe844ef5 | |
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 }} | |
run-mypy: | |
name: Run mypy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 | |
with: | |
python-version: 3.12 | |
- name: Install dependencies | |
run: python -m pip install -r requirements-dev.txt | |
- name: Run mypy | |
run: mypy src |