Skip to content

Commit e3b3948

Browse files
committed
Add-back lint + build, for now
1 parent 6aeb46f commit e3b3948

2 files changed

Lines changed: 177 additions & 0 deletions

File tree

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
name: Durable Task Scheduler SDK (durabletask-azuremanaged)
2+
3+
on:
4+
push:
5+
branches:
6+
- "main"
7+
tags:
8+
- "azuremanaged-v*" # Only run for tags starting with "azuremanaged-v"
9+
pull_request:
10+
branches:
11+
- "main"
12+
13+
permissions:
14+
contents: read
15+
16+
jobs:
17+
lint:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v4
21+
- name: Set up Python 3.14
22+
uses: actions/setup-python@v5
23+
with:
24+
python-version: 3.14
25+
- name: Install dependencies
26+
working-directory: durabletask-azuremanaged
27+
run: |
28+
python -m pip install --upgrade pip
29+
pip install setuptools wheel tox
30+
pip install flake8
31+
- name: Run flake8 Linter
32+
working-directory: durabletask-azuremanaged
33+
run: flake8 .
34+
- name: Run flake8 Linter
35+
working-directory: tests/durabletask-azuremanaged
36+
run: flake8 .
37+
38+
run-docker-tests:
39+
strategy:
40+
fail-fast: false
41+
matrix:
42+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
43+
env:
44+
EMULATOR_VERSION: "latest"
45+
needs: lint
46+
runs-on: ubuntu-latest
47+
steps:
48+
- name: Checkout repository
49+
uses: actions/checkout@v4
50+
51+
- name: Pull Docker image
52+
run: docker pull mcr.microsoft.com/dts/dts-emulator:$EMULATOR_VERSION
53+
54+
- name: Run Docker container
55+
run: |
56+
docker run --name dtsemulator -d -p 8080:8080 mcr.microsoft.com/dts/dts-emulator:$EMULATOR_VERSION
57+
58+
- name: Wait for container to be ready
59+
run: sleep 10 # Adjust if your service needs more time to start
60+
61+
- name: Set environment variables
62+
run: |
63+
echo "TASKHUB=default" >> $GITHUB_ENV
64+
echo "ENDPOINT=http://localhost:8080" >> $GITHUB_ENV
65+
66+
- name: Install durabletask dependencies
67+
run: |
68+
python -m pip install --upgrade pip
69+
pip install flake8 pytest
70+
pip install -r requirements.txt
71+
72+
- name: Install durabletask-azuremanaged dependencies
73+
working-directory: examples
74+
run: |
75+
python -m pip install --upgrade pip
76+
pip install -r requirements.txt
77+
78+
- name: Install durabletask-azuremanaged locally
79+
working-directory: durabletask-azuremanaged
80+
run: |
81+
pip install . --no-deps --force-reinstall
82+
83+
- name: Install durabletask locally
84+
run: |
85+
pip install . --no-deps --force-reinstall
86+
87+
- name: Run the tests
88+
working-directory: tests/durabletask-azuremanaged
89+
run: |
90+
pytest -m "dts" --verbose

.github/workflows/durabletask.yml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
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+
permissions:
14+
contents: read
15+
16+
jobs:
17+
lint-and-unit-tests:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v4
21+
- name: Set up Python 3.14
22+
uses: actions/setup-python@v5
23+
with:
24+
python-version: 3.14
25+
- name: Install dependencies
26+
run: |
27+
python -m pip install --upgrade pip
28+
pip install setuptools wheel tox
29+
pip install flake8
30+
- name: Run flake8 Linter
31+
working-directory: durabletask
32+
run: flake8 .
33+
- name: "Run flake8 linter: tests"
34+
working-directory: tests/durabletask
35+
run: flake8 .
36+
- name: "Run flake8 linter: examples"
37+
working-directory: examples
38+
run: flake8 .
39+
40+
run-tests:
41+
strategy:
42+
fail-fast: false
43+
matrix:
44+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
45+
needs: lint-and-unit-tests
46+
runs-on: ubuntu-latest
47+
steps:
48+
- name: Checkout repository
49+
uses: actions/checkout@v4
50+
51+
- name: Set up Python ${{ matrix.python-version }}
52+
uses: actions/setup-python@v5
53+
with:
54+
python-version: ${{ matrix.python-version }}
55+
56+
- name: Set up Node.js (needed for Azurite)
57+
uses: actions/setup-node@v4
58+
with:
59+
node-version: '20.x'
60+
61+
- name: Cache npm
62+
uses: actions/cache@v3
63+
with:
64+
path: ~/.npm
65+
key: ${{ runner.os }}-npm-azurite
66+
67+
- name: Install Azurite
68+
run: npm install -g azurite
69+
70+
- name: Start Azurite
71+
shell: bash
72+
run: |
73+
azurite-blob --silent --blobPort 10000 &
74+
sleep 2
75+
76+
- name: Install durabletask dependencies and the library itself
77+
run: |
78+
python -m pip install --upgrade pip
79+
pip install flake8 pytest
80+
pip install -r requirements.txt
81+
pip install ".[azure-blob-payloads]"
82+
pip install aiohttp
83+
84+
- name: Pytest unit tests
85+
working-directory: tests/durabletask
86+
run: |
87+
pytest -m "not dts" --verbose

0 commit comments

Comments
 (0)