Skip to content

Commit

Permalink
try
Browse files Browse the repository at this point in the history
  • Loading branch information
sentrivana committed Jun 19, 2023
1 parent 0792db2 commit cdf3fc2
Show file tree
Hide file tree
Showing 18 changed files with 79 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/test-common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ jobs:
name: common, python ${{ matrix.python-version }}, ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 30
container:
image: python:2.7.18-buster

strategy:
fail-fast: false
Expand Down Expand Up @@ -75,6 +77,8 @@ jobs:
# Always run this, even if a dependent job failed
if: always()
runs-on: ubuntu-20.04
container:
image: python:2.7.18-buster
steps:
- name: Check for failures
if: contains(needs.test.result, 'failure')
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test-integration-boto3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ jobs:
name: boto3, python ${{ matrix.python-version }}, ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 30
container:
image: python:2.7.18-buster

strategy:
fail-fast: false
Expand Down Expand Up @@ -75,6 +77,8 @@ jobs:
# Always run this, even if a dependent job failed
if: always()
runs-on: ubuntu-20.04
container:
image: python:2.7.18-buster
steps:
- name: Check for failures
if: contains(needs.test.result, 'failure')
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test-integration-bottle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ jobs:
name: bottle, python ${{ matrix.python-version }}, ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 30
container:
image: python:2.7.18-buster

strategy:
fail-fast: false
Expand Down Expand Up @@ -75,6 +77,8 @@ jobs:
# Always run this, even if a dependent job failed
if: always()
runs-on: ubuntu-20.04
container:
image: python:2.7.18-buster
steps:
- name: Check for failures
if: contains(needs.test.result, 'failure')
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test-integration-celery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ jobs:
name: celery, python ${{ matrix.python-version }}, ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 30
container:
image: python:2.7.18-buster

strategy:
fail-fast: false
Expand Down Expand Up @@ -75,6 +77,8 @@ jobs:
# Always run this, even if a dependent job failed
if: always()
runs-on: ubuntu-20.04
container:
image: python:2.7.18-buster
steps:
- name: Check for failures
if: contains(needs.test.result, 'failure')
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test-integration-django.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ jobs:
name: django, python ${{ matrix.python-version }}, ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 30
container:
image: python:2.7.18-buster

strategy:
fail-fast: false
Expand Down Expand Up @@ -93,6 +95,8 @@ jobs:
# Always run this, even if a dependent job failed
if: always()
runs-on: ubuntu-20.04
container:
image: python:2.7.18-buster
steps:
- name: Check for failures
if: contains(needs.test.result, 'failure')
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test-integration-falcon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ jobs:
name: falcon, python ${{ matrix.python-version }}, ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 30
container:
image: python:2.7.18-buster

strategy:
fail-fast: false
Expand Down Expand Up @@ -75,6 +77,8 @@ jobs:
# Always run this, even if a dependent job failed
if: always()
runs-on: ubuntu-20.04
container:
image: python:2.7.18-buster
steps:
- name: Check for failures
if: contains(needs.test.result, 'failure')
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test-integration-flask.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ jobs:
name: flask, python ${{ matrix.python-version }}, ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 30
container:
image: python:2.7.18-buster

strategy:
fail-fast: false
Expand Down Expand Up @@ -75,6 +77,8 @@ jobs:
# Always run this, even if a dependent job failed
if: always()
runs-on: ubuntu-20.04
container:
image: python:2.7.18-buster
steps:
- name: Check for failures
if: contains(needs.test.result, 'failure')
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test-integration-gevent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ jobs:
name: gevent, python ${{ matrix.python-version }}, ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 30
container:
image: python:2.7.18-buster

strategy:
fail-fast: false
Expand Down Expand Up @@ -75,6 +77,8 @@ jobs:
# Always run this, even if a dependent job failed
if: always()
runs-on: ubuntu-20.04
container:
image: python:2.7.18-buster
steps:
- name: Check for failures
if: contains(needs.test.result, 'failure')
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test-integration-huey.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ jobs:
name: huey, python ${{ matrix.python-version }}, ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 30
container:
image: python:2.7.18-buster

strategy:
fail-fast: false
Expand Down Expand Up @@ -75,6 +77,8 @@ jobs:
# Always run this, even if a dependent job failed
if: always()
runs-on: ubuntu-20.04
container:
image: python:2.7.18-buster
steps:
- name: Check for failures
if: contains(needs.test.result, 'failure')
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test-integration-pymongo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ jobs:
name: pymongo, python ${{ matrix.python-version }}, ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 30
container:
image: python:2.7.18-buster

strategy:
fail-fast: false
Expand Down Expand Up @@ -75,6 +77,8 @@ jobs:
# Always run this, even if a dependent job failed
if: always()
runs-on: ubuntu-20.04
container:
image: python:2.7.18-buster
steps:
- name: Check for failures
if: contains(needs.test.result, 'failure')
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test-integration-pyramid.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ jobs:
name: pyramid, python ${{ matrix.python-version }}, ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 30
container:
image: python:2.7.18-buster

strategy:
fail-fast: false
Expand Down Expand Up @@ -75,6 +77,8 @@ jobs:
# Always run this, even if a dependent job failed
if: always()
runs-on: ubuntu-20.04
container:
image: python:2.7.18-buster
steps:
- name: Check for failures
if: contains(needs.test.result, 'failure')
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test-integration-redis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ jobs:
name: redis, python ${{ matrix.python-version }}, ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 30
container:
image: python:2.7.18-buster

strategy:
fail-fast: false
Expand Down Expand Up @@ -75,6 +77,8 @@ jobs:
# Always run this, even if a dependent job failed
if: always()
runs-on: ubuntu-20.04
container:
image: python:2.7.18-buster
steps:
- name: Check for failures
if: contains(needs.test.result, 'failure')
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test-integration-rediscluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ jobs:
name: rediscluster, python ${{ matrix.python-version }}, ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 30
container:
image: python:2.7.18-buster

strategy:
fail-fast: false
Expand Down Expand Up @@ -75,6 +77,8 @@ jobs:
# Always run this, even if a dependent job failed
if: always()
runs-on: ubuntu-20.04
container:
image: python:2.7.18-buster
steps:
- name: Check for failures
if: contains(needs.test.result, 'failure')
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test-integration-requests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ jobs:
name: requests, python ${{ matrix.python-version }}, ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 30
container:
image: python:2.7.18-buster

strategy:
fail-fast: false
Expand Down Expand Up @@ -75,6 +77,8 @@ jobs:
# Always run this, even if a dependent job failed
if: always()
runs-on: ubuntu-20.04
container:
image: python:2.7.18-buster
steps:
- name: Check for failures
if: contains(needs.test.result, 'failure')
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test-integration-rq.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ jobs:
name: rq, python ${{ matrix.python-version }}, ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 30
container:
image: python:2.7.18-buster

strategy:
fail-fast: false
Expand Down Expand Up @@ -75,6 +77,8 @@ jobs:
# Always run this, even if a dependent job failed
if: always()
runs-on: ubuntu-20.04
container:
image: python:2.7.18-buster
steps:
- name: Check for failures
if: contains(needs.test.result, 'failure')
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test-integration-sqlalchemy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ jobs:
name: sqlalchemy, python ${{ matrix.python-version }}, ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 30
container:
image: python:2.7.18-buster

strategy:
fail-fast: false
Expand Down Expand Up @@ -75,6 +77,8 @@ jobs:
# Always run this, even if a dependent job failed
if: always()
runs-on: ubuntu-20.04
container:
image: python:2.7.18-buster
steps:
- name: Check for failures
if: contains(needs.test.result, 'failure')
Expand Down
2 changes: 2 additions & 0 deletions scripts/split-tox-gh-actions/ci-yaml.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
name: {{ framework }}, python ${{ matrix.python-version }}, ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 30
{{ docker_image }}
{{ strategy_matrix }}
{{ services }}

Expand Down Expand Up @@ -67,6 +68,7 @@ jobs:
# Always run this, even if a dependent job failed
if: always()
runs-on: ubuntu-20.04
{{ docker_image }}
steps:
- name: Check for failures
if: contains(needs.test.result, 'failure')
Expand Down
15 changes: 13 additions & 2 deletions scripts/split-tox-gh-actions/split-tox-gh-actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@
os: [ubuntu-20.04]
"""

DOCKER_IMAGE_FOR_27 = """\
container:
image: python:2.7.18-buster
"""


def write_yaml_file(
template,
Expand All @@ -52,9 +57,10 @@ def write_yaml_file(
# render template for print
out = ""
for template_line in template:
if template_line == "{{ strategy_matrix }}\n":
py_versions = [f'"{py.replace("py", "")}"' for py in python_versions]
py_versions = [py.replace("py", "") for py in python_versions]

if template_line == "{{ strategy_matrix }}\n":
py_versions = [f'"{py}"' for py in py_versions]
m = MATRIX_DEFINITION
m = m.replace("{{ framework }}", current_framework).replace(
"{{ python-version }}", ",".join(py_versions)
Expand All @@ -67,6 +73,11 @@ def write_yaml_file(
out += "".join(f.readlines())
f.close()

elif template_line == "{{ docker_image }}\n":
print(py_versions)
if "2.7" in py_versions:
out += DOCKER_IMAGE_FOR_27

else:
out += template_line.replace("{{ framework }}", current_framework)

Expand Down

0 comments on commit cdf3fc2

Please sign in to comment.