Skip to content

Commit 2d72e1a

Browse files
committed
Integration reusable workflow
1 parent 711d62b commit 2d72e1a

11 files changed

+101
-411
lines changed

.github/workflows/build-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818

1919
- name: Get full Python version
2020
id: full-python-version
21-
run: echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))")
21+
run: echo "version=$(python -c \"import sys; print('-'.join(str(v) for v in sys.version_info))\")" >> "$GITHUB_OUTPUT"
2222

2323
- name: Set up poetry
2424
uses: Gr1N/setup-poetry@v9

.github/workflows/integration-aiohttp.yml

Lines changed: 4 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -5,56 +5,9 @@ on:
55
pull_request:
66
types: [opened, synchronize]
77

8-
permissions:
9-
contents: read
10-
id-token: write
11-
128
jobs:
139
integration-aiohttp:
14-
name: "Integration aiohttp"
15-
runs-on: ubuntu-latest
16-
strategy:
17-
matrix:
18-
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
19-
fail-fast: false
20-
steps:
21-
- uses: actions/checkout@v6
22-
23-
- name: Set up Python ${{ matrix.python-version }}
24-
uses: actions/setup-python@v6
25-
with:
26-
python-version: ${{ matrix.python-version }}
27-
28-
- name: Get full Python version
29-
id: full-python-version
30-
run: echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))")
31-
32-
- name: Set up poetry
33-
uses: Gr1N/setup-poetry@v9
34-
with:
35-
poetry-version: "2.3.1"
36-
37-
- name: Configure poetry
38-
run: poetry config virtualenvs.in-project true
39-
40-
- name: Set up cache
41-
uses: actions/cache@v5
42-
id: cache
43-
with:
44-
path: .venv
45-
key: venv-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }}
46-
47-
- name: Ensure cache is healthy
48-
if: steps.cache.outputs.cache-hit == 'true'
49-
run: timeout 10s poetry run pip --version || rm -rf .venv
50-
51-
- name: Install dependencies
52-
run: poetry install --all-extras
53-
54-
- name: Test
55-
env:
56-
PYTEST_ADDOPTS: "--color=yes"
57-
run: poetry run pytest tests/integration/contrib/aiohttp
58-
59-
- name: Upload coverage
60-
uses: codecov/codecov-action@v5
10+
uses: ./.github/workflows/integration-reusable.yml
11+
with:
12+
integration: aiohttp
13+
secrets: inherit

.github/workflows/integration-django.yml

Lines changed: 4 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -5,56 +5,9 @@ on:
55
pull_request:
66
types: [opened, synchronize]
77

8-
permissions:
9-
contents: read
10-
id-token: write
11-
128
jobs:
139
integration-django:
14-
name: "Integration django"
15-
runs-on: ubuntu-latest
16-
strategy:
17-
matrix:
18-
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
19-
fail-fast: false
20-
steps:
21-
- uses: actions/checkout@v6
22-
23-
- name: Set up Python ${{ matrix.python-version }}
24-
uses: actions/setup-python@v6
25-
with:
26-
python-version: ${{ matrix.python-version }}
27-
28-
- name: Get full Python version
29-
id: full-python-version
30-
run: echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))")
31-
32-
- name: Set up poetry
33-
uses: Gr1N/setup-poetry@v9
34-
with:
35-
poetry-version: "2.3.1"
36-
37-
- name: Configure poetry
38-
run: poetry config virtualenvs.in-project true
39-
40-
- name: Set up cache
41-
uses: actions/cache@v5
42-
id: cache
43-
with:
44-
path: .venv
45-
key: venv-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }}
46-
47-
- name: Ensure cache is healthy
48-
if: steps.cache.outputs.cache-hit == 'true'
49-
run: timeout 10s poetry run pip --version || rm -rf .venv
50-
51-
- name: Install dependencies
52-
run: poetry install --all-extras
53-
54-
- name: Test
55-
env:
56-
PYTEST_ADDOPTS: "--color=yes"
57-
run: poetry run pytest tests/integration/contrib/django
58-
59-
- name: Upload coverage
60-
uses: codecov/codecov-action@v5
10+
uses: ./.github/workflows/integration-reusable.yml
11+
with:
12+
integration: django
13+
secrets: inherit

.github/workflows/integration-falcon.yml

Lines changed: 4 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -5,56 +5,9 @@ on:
55
pull_request:
66
types: [opened, synchronize]
77

8-
permissions:
9-
contents: read
10-
id-token: write
11-
128
jobs:
139
integration-falcon:
14-
name: "Integration falcon"
15-
runs-on: ubuntu-latest
16-
strategy:
17-
matrix:
18-
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
19-
fail-fast: false
20-
steps:
21-
- uses: actions/checkout@v6
22-
23-
- name: Set up Python ${{ matrix.python-version }}
24-
uses: actions/setup-python@v6
25-
with:
26-
python-version: ${{ matrix.python-version }}
27-
28-
- name: Get full Python version
29-
id: full-python-version
30-
run: echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))")
31-
32-
- name: Set up poetry
33-
uses: Gr1N/setup-poetry@v9
34-
with:
35-
poetry-version: "2.3.1"
36-
37-
- name: Configure poetry
38-
run: poetry config virtualenvs.in-project true
39-
40-
- name: Set up cache
41-
uses: actions/cache@v5
42-
id: cache
43-
with:
44-
path: .venv
45-
key: venv-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }}
46-
47-
- name: Ensure cache is healthy
48-
if: steps.cache.outputs.cache-hit == 'true'
49-
run: timeout 10s poetry run pip --version || rm -rf .venv
50-
51-
- name: Install dependencies
52-
run: poetry install --all-extras
53-
54-
- name: Test
55-
env:
56-
PYTEST_ADDOPTS: "--color=yes"
57-
run: poetry run pytest tests/integration/contrib/falcon
58-
59-
- name: Upload coverage
60-
uses: codecov/codecov-action@v5
10+
uses: ./.github/workflows/integration-reusable.yml
11+
with:
12+
integration: falcon
13+
secrets: inherit

.github/workflows/integration-fastapi.yml

Lines changed: 4 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -5,56 +5,9 @@ on:
55
pull_request:
66
types: [opened, synchronize]
77

8-
permissions:
9-
contents: read
10-
id-token: write
11-
128
jobs:
139
integration-fastapi:
14-
name: "Integration fastapi"
15-
runs-on: ubuntu-latest
16-
strategy:
17-
matrix:
18-
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
19-
fail-fast: false
20-
steps:
21-
- uses: actions/checkout@v6
22-
23-
- name: Set up Python ${{ matrix.python-version }}
24-
uses: actions/setup-python@v6
25-
with:
26-
python-version: ${{ matrix.python-version }}
27-
28-
- name: Get full Python version
29-
id: full-python-version
30-
run: echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))")
31-
32-
- name: Set up poetry
33-
uses: Gr1N/setup-poetry@v9
34-
with:
35-
poetry-version: "2.3.1"
36-
37-
- name: Configure poetry
38-
run: poetry config virtualenvs.in-project true
39-
40-
- name: Set up cache
41-
uses: actions/cache@v5
42-
id: cache
43-
with:
44-
path: .venv
45-
key: venv-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }}
46-
47-
- name: Ensure cache is healthy
48-
if: steps.cache.outputs.cache-hit == 'true'
49-
run: timeout 10s poetry run pip --version || rm -rf .venv
50-
51-
- name: Install dependencies
52-
run: poetry install --all-extras
53-
54-
- name: Test
55-
env:
56-
PYTEST_ADDOPTS: "--color=yes"
57-
run: poetry run pytest tests/integration/contrib/fastapi
58-
59-
- name: Upload coverage
60-
uses: codecov/codecov-action@v5
10+
uses: ./.github/workflows/integration-reusable.yml
11+
with:
12+
integration: fastapi
13+
secrets: inherit

.github/workflows/integration-flask.yml

Lines changed: 4 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -5,56 +5,9 @@ on:
55
pull_request:
66
types: [opened, synchronize]
77

8-
permissions:
9-
contents: read
10-
id-token: write
11-
128
jobs:
139
integration-flask:
14-
name: "Integration flask"
15-
runs-on: ubuntu-latest
16-
strategy:
17-
matrix:
18-
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
19-
fail-fast: false
20-
steps:
21-
- uses: actions/checkout@v6
22-
23-
- name: Set up Python ${{ matrix.python-version }}
24-
uses: actions/setup-python@v6
25-
with:
26-
python-version: ${{ matrix.python-version }}
27-
28-
- name: Get full Python version
29-
id: full-python-version
30-
run: echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))")
31-
32-
- name: Set up poetry
33-
uses: Gr1N/setup-poetry@v9
34-
with:
35-
poetry-version: "2.3.1"
36-
37-
- name: Configure poetry
38-
run: poetry config virtualenvs.in-project true
39-
40-
- name: Set up cache
41-
uses: actions/cache@v5
42-
id: cache
43-
with:
44-
path: .venv
45-
key: venv-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }}
46-
47-
- name: Ensure cache is healthy
48-
if: steps.cache.outputs.cache-hit == 'true'
49-
run: timeout 10s poetry run pip --version || rm -rf .venv
50-
51-
- name: Install dependencies
52-
run: poetry install --all-extras
53-
54-
- name: Test
55-
env:
56-
PYTEST_ADDOPTS: "--color=yes"
57-
run: poetry run pytest tests/integration/contrib/flask
58-
59-
- name: Upload coverage
60-
uses: codecov/codecov-action@v5
10+
uses: ./.github/workflows/integration-reusable.yml
11+
with:
12+
integration: flask
13+
secrets: inherit

.github/workflows/integration-requests.yml

Lines changed: 4 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -5,56 +5,9 @@ on:
55
pull_request:
66
types: [opened, synchronize]
77

8-
permissions:
9-
contents: read
10-
id-token: write
11-
128
jobs:
139
integration-requests:
14-
name: "Integration requests"
15-
runs-on: ubuntu-latest
16-
strategy:
17-
matrix:
18-
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
19-
fail-fast: false
20-
steps:
21-
- uses: actions/checkout@v6
22-
23-
- name: Set up Python ${{ matrix.python-version }}
24-
uses: actions/setup-python@v6
25-
with:
26-
python-version: ${{ matrix.python-version }}
27-
28-
- name: Get full Python version
29-
id: full-python-version
30-
run: echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))")
31-
32-
- name: Set up poetry
33-
uses: Gr1N/setup-poetry@v9
34-
with:
35-
poetry-version: "2.3.1"
36-
37-
- name: Configure poetry
38-
run: poetry config virtualenvs.in-project true
39-
40-
- name: Set up cache
41-
uses: actions/cache@v5
42-
id: cache
43-
with:
44-
path: .venv
45-
key: venv-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }}
46-
47-
- name: Ensure cache is healthy
48-
if: steps.cache.outputs.cache-hit == 'true'
49-
run: timeout 10s poetry run pip --version || rm -rf .venv
50-
51-
- name: Install dependencies
52-
run: poetry install --all-extras
53-
54-
- name: Test
55-
env:
56-
PYTEST_ADDOPTS: "--color=yes"
57-
run: poetry run pytest tests/integration/contrib/requests
58-
59-
- name: Upload coverage
60-
uses: codecov/codecov-action@v5
10+
uses: ./.github/workflows/integration-reusable.yml
11+
with:
12+
integration: requests
13+
secrets: inherit

0 commit comments

Comments
 (0)