From 6aeb46f9b8228267e44e037641997bb04d2fb3c0 Mon Sep 17 00:00:00 2001 From: Andy Staples Date: Wed, 20 May 2026 12:17:07 -0600 Subject: [PATCH 1/2] Remove old pipelines, add code mirror step --- .../durabletask-azuremanaged-dev.yml | 55 -------- .../durabletask-azuremanaged-experimental.yml | 54 -------- .../workflows/durabletask-azuremanaged.yml | 129 ------------------ .github/workflows/durabletask-dev.yml | 52 ------- .github/workflows/durabletask-experiment.yml | 50 ------- .github/workflows/durabletask.yml | 123 ----------------- eng/ci/code-mirror.yml | 20 +++ 7 files changed, 20 insertions(+), 463 deletions(-) delete mode 100644 .github/workflows/durabletask-azuremanaged-dev.yml delete mode 100644 .github/workflows/durabletask-azuremanaged-experimental.yml delete mode 100644 .github/workflows/durabletask-azuremanaged.yml delete mode 100644 .github/workflows/durabletask-dev.yml delete mode 100644 .github/workflows/durabletask-experiment.yml delete mode 100644 .github/workflows/durabletask.yml create mode 100644 eng/ci/code-mirror.yml diff --git a/.github/workflows/durabletask-azuremanaged-dev.yml b/.github/workflows/durabletask-azuremanaged-dev.yml deleted file mode 100644 index e842e91f..00000000 --- a/.github/workflows/durabletask-azuremanaged-dev.yml +++ /dev/null @@ -1,55 +0,0 @@ -name: Durable Task Scheduler SDK (durabletask-azuremanaged) Dev Release - -on: - workflow_run: - workflows: ["Durable Task Scheduler SDK (durabletask-azuremanaged)"] - types: - - completed - branches: - - main - -permissions: - contents: read - -jobs: - publish-dev: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Extract version from tag - run: echo "VERSION=${GITHUB_REF#refs/tags/azuremanaged-v}" >> $GITHUB_ENV # Extract version from the tag - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: "3.14" # Adjust Python version as needed - - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install build twine - - - name: Append dev to version in pyproject.toml - working-directory: durabletask-azuremanaged - run: | - sed -i 's/^version = "\(.*\)"/version = "\1.dev${{ github.run_number }}"/' pyproject.toml - - - name: Build package from directory durabletask-azuremanaged - working-directory: durabletask-azuremanaged - run: | - python -m build - - - name: Check package - working-directory: durabletask-azuremanaged - run: | - twine check dist/* - - - name: Publish package to PyPI - env: - TWINE_USERNAME: __token__ - TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN_AZUREMANAGED }} # Store your PyPI API token in GitHub Secrets - working-directory: durabletask-azuremanaged - run: | - twine upload dist/* \ No newline at end of file diff --git a/.github/workflows/durabletask-azuremanaged-experimental.yml b/.github/workflows/durabletask-azuremanaged-experimental.yml deleted file mode 100644 index ff9e8c25..00000000 --- a/.github/workflows/durabletask-azuremanaged-experimental.yml +++ /dev/null @@ -1,54 +0,0 @@ -name: Durable Task Scheduler SDK (durabletask-azuremanaged) Experimental Release - -on: - push: - branches-ignore: - - main - - release/* - -permissions: - contents: read - -jobs: - publish-experimental: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Extract version from tag - run: echo "VERSION=${GITHUB_REF#refs/tags/azuremanaged-v}" >> $GITHUB_ENV # Extract version from the tag - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: "3.14" # Adjust Python version as needed - - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install build twine - - - name: Change the version in pyproject.toml to 0.0.0dev{github.run_number} - working-directory: durabletask-azuremanaged - run: | - sed -i 's/^version = ".*"/version = "0.0.0.dev${{ github.run_number }}"/' pyproject.toml - sed -i 's/"durabletask>=.*"/"durabletask>=0.0.0dev1"/' pyproject.toml - - - name: Build package from directory durabletask-azuremanaged - working-directory: durabletask-azuremanaged - run: | - python -m build - - - name: Check package - working-directory: durabletask-azuremanaged - run: | - twine check dist/* - - - name: Publish package to PyPI - env: - TWINE_USERNAME: __token__ - TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN_AZUREMANAGED }} # Store your PyPI API token in GitHub Secrets - working-directory: durabletask-azuremanaged - run: | - twine upload dist/* \ No newline at end of file diff --git a/.github/workflows/durabletask-azuremanaged.yml b/.github/workflows/durabletask-azuremanaged.yml deleted file mode 100644 index b2b8369a..00000000 --- a/.github/workflows/durabletask-azuremanaged.yml +++ /dev/null @@ -1,129 +0,0 @@ -name: Durable Task Scheduler SDK (durabletask-azuremanaged) - -on: - push: - branches: - - "main" - tags: - - "azuremanaged-v*" # Only run for tags starting with "azuremanaged-v" - pull_request: - branches: - - "main" - -permissions: - contents: read - -jobs: - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Set up Python 3.14 - uses: actions/setup-python@v5 - with: - python-version: 3.14 - - name: Install dependencies - working-directory: durabletask-azuremanaged - run: | - python -m pip install --upgrade pip - pip install setuptools wheel tox - pip install flake8 - - name: Run flake8 Linter - working-directory: durabletask-azuremanaged - run: flake8 . - - name: Run flake8 Linter - working-directory: tests/durabletask-azuremanaged - run: flake8 . - - run-docker-tests: - strategy: - fail-fast: false - matrix: - python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] - env: - EMULATOR_VERSION: "latest" - needs: lint - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Pull Docker image - run: docker pull mcr.microsoft.com/dts/dts-emulator:$EMULATOR_VERSION - - - name: Run Docker container - run: | - docker run --name dtsemulator -d -p 8080:8080 mcr.microsoft.com/dts/dts-emulator:$EMULATOR_VERSION - - - name: Wait for container to be ready - run: sleep 10 # Adjust if your service needs more time to start - - - name: Set environment variables - run: | - echo "TASKHUB=default" >> $GITHUB_ENV - echo "ENDPOINT=http://localhost:8080" >> $GITHUB_ENV - - - name: Install durabletask dependencies - run: | - python -m pip install --upgrade pip - pip install flake8 pytest - pip install -r requirements.txt - - - name: Install durabletask-azuremanaged dependencies - working-directory: examples - run: | - python -m pip install --upgrade pip - pip install -r requirements.txt - - - name: Install durabletask-azuremanaged locally - working-directory: durabletask-azuremanaged - run: | - pip install . --no-deps --force-reinstall - - - name: Install durabletask locally - run: | - pip install . --no-deps --force-reinstall - - - name: Run the tests - working-directory: tests/durabletask-azuremanaged - run: | - pytest -m "dts" --verbose - - publish-release: - if: startsWith(github.ref, 'refs/tags/azuremanaged-v') # Only run if a matching tag is pushed - needs: run-docker-tests - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Extract version from tag - run: echo "VERSION=${GITHUB_REF#refs/tags/azuremanaged-v}" >> $GITHUB_ENV # Extract version from the tag - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: "3.14" # Adjust Python version as needed - - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install build twine - - - name: Build package from directory durabletask-azuremanaged - working-directory: durabletask-azuremanaged - run: | - python -m build - - - name: Check package - working-directory: durabletask-azuremanaged - run: | - twine check dist/* - - - name: Publish package to PyPI - env: - TWINE_USERNAME: __token__ - TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN_AZUREMANAGED }} # Store your PyPI API token in GitHub Secrets - working-directory: durabletask-azuremanaged - run: | - twine upload dist/* \ No newline at end of file diff --git a/.github/workflows/durabletask-dev.yml b/.github/workflows/durabletask-dev.yml deleted file mode 100644 index ec226b2f..00000000 --- a/.github/workflows/durabletask-dev.yml +++ /dev/null @@ -1,52 +0,0 @@ -name: Durable Task SDK (durabletask) Dev Release - -on: - workflow_run: - workflows: ["Durable Task SDK (durabletask)"] - types: - - completed - branches: - - main - -permissions: - contents: read - -jobs: - publish-dev: - # needs: run-tests - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Extract version from tag - run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV # Extract version from the tag - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: "3.14" # Adjust Python version as needed - - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install build twine - - - name: Append dev to version in pyproject.toml - run: | - sed -i 's/^version = "\(.*\)"/version = "\1.dev${{ github.run_number }}"/' pyproject.toml - - - name: Build package from root directory - run: | - python -m build - - - name: Check package - run: | - twine check dist/* - - - name: Publish package to PyPI - env: - TWINE_USERNAME: __token__ - TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} # Store your PyPI API token in GitHub Secrets - run: | - twine upload dist/* \ No newline at end of file diff --git a/.github/workflows/durabletask-experiment.yml b/.github/workflows/durabletask-experiment.yml deleted file mode 100644 index 11815672..00000000 --- a/.github/workflows/durabletask-experiment.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: Durable Task SDK (durabletask) Experimental Release - -on: - push: - branches-ignore: - - main - - release/* - -permissions: - contents: read - -jobs: - publish-experimental: - # needs: run-tests - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Extract version from tag - run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV # Extract version from the tag - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: "3.14" # Adjust Python version as needed - - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install build twine - - - name: Change the version in pyproject.toml to 0.0.0dev{github.run_number} - run: | - sed -i 's/^version = ".*"/version = "0.0.0.dev${{ github.run_number }}"/' pyproject.toml - - - name: Build package from root directory - run: | - python -m build - - - name: Check package - run: | - twine check dist/* - - - name: Publish package to PyPI - env: - TWINE_USERNAME: __token__ - TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} # Store your PyPI API token in GitHub Secrets - run: | - twine upload dist/* \ No newline at end of file diff --git a/.github/workflows/durabletask.yml b/.github/workflows/durabletask.yml deleted file mode 100644 index 1fd072a0..00000000 --- a/.github/workflows/durabletask.yml +++ /dev/null @@ -1,123 +0,0 @@ -name: Durable Task SDK (durabletask) - -on: - push: - branches: - - "main" - tags: - - "v*" # Only run for tags starting with "v" - pull_request: - branches: - - "main" - -permissions: - contents: read - -jobs: - lint-and-unit-tests: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Set up Python 3.14 - uses: actions/setup-python@v5 - with: - python-version: 3.14 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install setuptools wheel tox - pip install flake8 - - name: Run flake8 Linter - working-directory: durabletask - run: flake8 . - - name: "Run flake8 linter: tests" - working-directory: tests/durabletask - run: flake8 . - - name: "Run flake8 linter: examples" - working-directory: examples - run: flake8 . - - run-tests: - strategy: - fail-fast: false - matrix: - python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] - needs: lint-and-unit-tests - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - - name: Set up Node.js (needed for Azurite) - uses: actions/setup-node@v4 - with: - node-version: '20.x' - - - name: Cache npm - uses: actions/cache@v3 - with: - path: ~/.npm - key: ${{ runner.os }}-npm-azurite - - - name: Install Azurite - run: npm install -g azurite - - - name: Start Azurite - shell: bash - run: | - azurite-blob --silent --blobPort 10000 & - sleep 2 - - - name: Install durabletask dependencies and the library itself - run: | - python -m pip install --upgrade pip - pip install flake8 pytest - pip install -r requirements.txt - pip install ".[azure-blob-payloads]" - pip install aiohttp - - - name: Pytest unit tests - working-directory: tests/durabletask - run: | - pytest -m "not dts" --verbose - - publish-release: - if: startsWith(github.ref, 'refs/tags/v') # Only run if a matching tag is pushed - needs: run-tests - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Extract version from tag - run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV # Extract version from the tag - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: "3.14" # Adjust Python version as needed - - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install build twine - - - name: Build package from root directory - run: | - python -m build - - - name: Check package - run: | - twine check dist/* - - - name: Publish package to PyPI - env: - TWINE_USERNAME: __token__ - TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} # Store your PyPI API token in GitHub Secrets - run: | - twine upload dist/* \ No newline at end of file diff --git a/eng/ci/code-mirror.yml b/eng/ci/code-mirror.yml new file mode 100644 index 00000000..352aca0a --- /dev/null +++ b/eng/ci/code-mirror.yml @@ -0,0 +1,20 @@ +trigger: + branches: + include: + - main + - release/* + +pr: none + +resources: + repositories: + - repository: eng + type: git + name: engineering + ref: refs/tags/release + +variables: + - template: ci/variables/cfs.yml@eng + +extends: + template: ci/code-mirror.yml@eng From e3b39483e47a4efcd99e33291487943f91c202f3 Mon Sep 17 00:00:00 2001 From: Andy Staples Date: Wed, 20 May 2026 12:25:11 -0600 Subject: [PATCH 2/2] Add-back lint + build, for now --- .../workflows/durabletask-azuremanaged.yml | 90 +++++++++++++++++++ .github/workflows/durabletask.yml | 87 ++++++++++++++++++ 2 files changed, 177 insertions(+) create mode 100644 .github/workflows/durabletask-azuremanaged.yml create mode 100644 .github/workflows/durabletask.yml diff --git a/.github/workflows/durabletask-azuremanaged.yml b/.github/workflows/durabletask-azuremanaged.yml new file mode 100644 index 00000000..24c4ace0 --- /dev/null +++ b/.github/workflows/durabletask-azuremanaged.yml @@ -0,0 +1,90 @@ +name: Durable Task Scheduler SDK (durabletask-azuremanaged) + +on: + push: + branches: + - "main" + tags: + - "azuremanaged-v*" # Only run for tags starting with "azuremanaged-v" + pull_request: + branches: + - "main" + +permissions: + contents: read + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Python 3.14 + uses: actions/setup-python@v5 + with: + python-version: 3.14 + - name: Install dependencies + working-directory: durabletask-azuremanaged + run: | + python -m pip install --upgrade pip + pip install setuptools wheel tox + pip install flake8 + - name: Run flake8 Linter + working-directory: durabletask-azuremanaged + run: flake8 . + - name: Run flake8 Linter + working-directory: tests/durabletask-azuremanaged + run: flake8 . + + run-docker-tests: + strategy: + fail-fast: false + matrix: + python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] + env: + EMULATOR_VERSION: "latest" + needs: lint + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Pull Docker image + run: docker pull mcr.microsoft.com/dts/dts-emulator:$EMULATOR_VERSION + + - name: Run Docker container + run: | + docker run --name dtsemulator -d -p 8080:8080 mcr.microsoft.com/dts/dts-emulator:$EMULATOR_VERSION + + - name: Wait for container to be ready + run: sleep 10 # Adjust if your service needs more time to start + + - name: Set environment variables + run: | + echo "TASKHUB=default" >> $GITHUB_ENV + echo "ENDPOINT=http://localhost:8080" >> $GITHUB_ENV + + - name: Install durabletask dependencies + run: | + python -m pip install --upgrade pip + pip install flake8 pytest + pip install -r requirements.txt + + - name: Install durabletask-azuremanaged dependencies + working-directory: examples + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + + - name: Install durabletask-azuremanaged locally + working-directory: durabletask-azuremanaged + run: | + pip install . --no-deps --force-reinstall + + - name: Install durabletask locally + run: | + pip install . --no-deps --force-reinstall + + - name: Run the tests + working-directory: tests/durabletask-azuremanaged + run: | + pytest -m "dts" --verbose diff --git a/.github/workflows/durabletask.yml b/.github/workflows/durabletask.yml new file mode 100644 index 00000000..553af567 --- /dev/null +++ b/.github/workflows/durabletask.yml @@ -0,0 +1,87 @@ +name: Durable Task SDK (durabletask) + +on: + push: + branches: + - "main" + tags: + - "v*" # Only run for tags starting with "v" + pull_request: + branches: + - "main" + +permissions: + contents: read + +jobs: + lint-and-unit-tests: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Python 3.14 + uses: actions/setup-python@v5 + with: + python-version: 3.14 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install setuptools wheel tox + pip install flake8 + - name: Run flake8 Linter + working-directory: durabletask + run: flake8 . + - name: "Run flake8 linter: tests" + working-directory: tests/durabletask + run: flake8 . + - name: "Run flake8 linter: examples" + working-directory: examples + run: flake8 . + + run-tests: + strategy: + fail-fast: false + matrix: + python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] + needs: lint-and-unit-tests + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Set up Node.js (needed for Azurite) + uses: actions/setup-node@v4 + with: + node-version: '20.x' + + - name: Cache npm + uses: actions/cache@v3 + with: + path: ~/.npm + key: ${{ runner.os }}-npm-azurite + + - name: Install Azurite + run: npm install -g azurite + + - name: Start Azurite + shell: bash + run: | + azurite-blob --silent --blobPort 10000 & + sleep 2 + + - name: Install durabletask dependencies and the library itself + run: | + python -m pip install --upgrade pip + pip install flake8 pytest + pip install -r requirements.txt + pip install ".[azure-blob-payloads]" + pip install aiohttp + + - name: Pytest unit tests + working-directory: tests/durabletask + run: | + pytest -m "not dts" --verbose