Skip to content

Commit af33c29

Browse files
committed
Update GitHub workflows and automate release
1 parent 6a2ab15 commit af33c29

File tree

3 files changed

+86
-61
lines changed

3 files changed

+86
-61
lines changed

.github/workflows/publish-dts-sdk.yml renamed to .github/workflows/durabletask-azuremanaged.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Publish Durable Task Scheduler to PyPI
1+
name: Durable Task Scheduler SDK (durabletask-azuremanaged)
22

33
on:
44
push:
@@ -31,7 +31,7 @@ jobs:
3131

3232
run-docker-tests:
3333
env:
34-
EMULATOR_VERSION: "v0.0.5" # Define the variable
34+
EMULATOR_VERSION: "latest"
3535
needs: lint
3636
runs-on: ubuntu-latest
3737
steps:

.github/workflows/durabletask.yml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: Durable Task SDK (durabletask)
2+
3+
on:
4+
push:
5+
branches:
6+
- "main"
7+
tags:
8+
- "v*" # Only run for tags starting with "v"
9+
pull_request:
10+
branches:
11+
- "main"
12+
13+
jobs:
14+
lint-and-unit-tests:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
- name: Set up Python 3.12
19+
uses: actions/setup-python@v5
20+
with:
21+
python-version: 3.12
22+
- name: Install dependencies
23+
run: |
24+
python -m pip install --upgrade pip
25+
pip install setuptools wheel tox
26+
pip install flake8
27+
- name: Run flake8 Linter
28+
run: flake8 .
29+
30+
run-e2e-tests:
31+
needs: lint-and-unit-tests
32+
runs-on: ubuntu-latest
33+
steps:
34+
- name: Checkout repository
35+
uses: actions/checkout@v4
36+
# Sidecar for running e2e tests requires Go SDK
37+
- name: Install Go SDK
38+
uses: actions/setup-go@v5
39+
with:
40+
go-version: 'stable'
41+
42+
# Install and run the durabletask-go sidecar for running e2e tests
43+
- name: Pytest e2e tests
44+
working-directory: tests/durabletask
45+
run: |
46+
go install github.com/microsoft/durabletask-go@main
47+
durabletask-go --port 4001 &
48+
pytest -m "e2e and not dts" --verbose
49+
50+
publish:
51+
if: startsWith(github.ref, 'refs/tags/v') # Only run if a matching tag is pushed
52+
needs: run-e2e-tests
53+
runs-on: ubuntu-latest
54+
steps:
55+
- name: Checkout code
56+
uses: actions/checkout@v4
57+
58+
- name: Extract version from tag
59+
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV # Extract version from the tag
60+
61+
- name: Set up Python
62+
uses: actions/setup-python@v5
63+
with:
64+
python-version: "3.12" # Adjust Python version as needed
65+
66+
- name: Install dependencies
67+
run: |
68+
python -m pip install --upgrade pip
69+
pip install build twine
70+
71+
- name: Build package from root directory
72+
run: |
73+
python -m build
74+
75+
- name: Check package
76+
run: |
77+
twine check dist/*
78+
79+
- name: Publish package to PyPI
80+
env:
81+
TWINE_USERNAME: __token__
82+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} # Store your PyPI API token in GitHub Secrets
83+
run: |
84+
twine upload dist/*

.github/workflows/pr-validation.yml

Lines changed: 0 additions & 59 deletions
This file was deleted.

0 commit comments

Comments
 (0)