Skip to content

Commit

Permalink
feat: added test python versions input (#74)
Browse files Browse the repository at this point in the history
* feat: added test_python_versions input
  • Loading branch information
adubovik authored Jul 22, 2024
1 parent a3c91f6 commit a4f0d85
Show file tree
Hide file tree
Showing 15 changed files with 57 additions and 43 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/generic_docker_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
lfs: true
- uses: epam/ai-dial-ci/actions/build_docker@1.8.3
- uses: epam/ai-dial-ci/actions/build_docker@1.9.0
with:
image_name: ghcr.io/${{ env.IMAGE_NAME }}
image_tag: test
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/generic_docker_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
is_latest: ${{ steps.semantic_versioning.outputs.is_latest }}
latest_tag: ${{ steps.semantic_versioning.outputs.latest_tag }}
steps:
- uses: epam/ai-dial-ci/actions/semantic_versioning@1.8.3
- uses: epam/ai-dial-ci/actions/semantic_versioning@1.9.0
id: semantic_versioning

release:
Expand All @@ -73,14 +73,14 @@ jobs:
- calculate_version
- test
steps:
- uses: epam/ai-dial-ci/actions/generate_release_notes@1.8.3
- uses: epam/ai-dial-ci/actions/generate_release_notes@1.9.0
with:
latest_tag: ${{ needs.calculate_version.outputs.latest_tag }}
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
lfs: true
token: ${{ secrets.ACTIONS_BOT_TOKEN }}
- uses: epam/ai-dial-ci/actions/build_docker@1.8.3
- uses: epam/ai-dial-ci/actions/build_docker@1.9.0
with:
ghcr_username: ${{ github.actor }}
ghcr_password: ${{ secrets.ACTIONS_BOT_TOKEN }}
Expand All @@ -97,7 +97,7 @@ jobs:
${{ github.ref == 'refs/heads/development' && format('{0}/{1}:{2}', 'ghcr.io', env.IMAGE_NAME, 'development') || ''}}
${{ startsWith(github.ref, 'refs/heads/release-') && needs.calculate_version.outputs.is_latest == 'true' && format('{0}:{1}', env.IMAGE_NAME, 'latest') || ''}}
${{ startsWith(github.ref, 'refs/heads/release-') && needs.calculate_version.outputs.is_latest == 'true' && format('{0}/{1}:{2}', 'ghcr.io', env.IMAGE_NAME, 'latest') || ''}}
- uses: epam/ai-dial-ci/actions/publish_tag_release@1.8.3
- uses: epam/ai-dial-ci/actions/publish_tag_release@1.9.0
with:
tag_version: ${{ needs.calculate_version.outputs.next_version }}
changelog_file: "/tmp/my_changelog" # comes from generate_release_notes step; TODO: beautify
2 changes: 1 addition & 1 deletion .github/workflows/generic_docker_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@ jobs:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
lfs: true
- uses: epam/ai-dial-ci/actions/ort@1.8.3
- uses: epam/ai-dial-ci/actions/ort@1.9.0
with:
bypass_checks: ${{ inputs.bypass_checks || inputs.bypass_ort }}
4 changes: 2 additions & 2 deletions .github/workflows/java_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
lfs: true
- uses: epam/ai-dial-ci/actions/java_prepare@1.8.3
- uses: epam/ai-dial-ci/actions/java_prepare@1.9.0
with:
java_version: ${{ inputs.java_version }}
java_distribution: ${{ inputs.java_distribution }}
Expand All @@ -83,7 +83,7 @@ jobs:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
lfs: true
- uses: epam/ai-dial-ci/actions/build_docker@1.8.3
- uses: epam/ai-dial-ci/actions/build_docker@1.9.0
with:
image_name: ghcr.io/${{ env.IMAGE_NAME }}
image_tag: test
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/java_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
is_latest: ${{ steps.semantic_versioning.outputs.is_latest }}
latest_tag: ${{ steps.semantic_versioning.outputs.latest_tag }}
steps:
- uses: epam/ai-dial-ci/actions/semantic_versioning@1.8.3
- uses: epam/ai-dial-ci/actions/semantic_versioning@1.9.0
id: semantic_versioning

release:
Expand All @@ -85,22 +85,22 @@ jobs:
- calculate_version
- test
steps:
- uses: epam/ai-dial-ci/actions/generate_release_notes@1.8.3
- uses: epam/ai-dial-ci/actions/generate_release_notes@1.9.0
with:
latest_tag: ${{ needs.calculate_version.outputs.latest_tag }}
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
lfs: true
token: ${{ secrets.ACTIONS_BOT_TOKEN }}
- uses: epam/ai-dial-ci/actions/java_prepare@1.8.3
- uses: epam/ai-dial-ci/actions/java_prepare@1.9.0
with:
java_version: ${{ inputs.java_version }}
java_distribution: ${{ inputs.java_distribution }}
- name: Set version
shell: bash
run: |
sed -i "s/^version = .*/version = \"${{ needs.calculate_version.outputs.next_version }}\"/g" build.gradle
- uses: epam/ai-dial-ci/actions/build_docker@1.8.3
- uses: epam/ai-dial-ci/actions/build_docker@1.9.0
with:
ghcr_username: ${{ github.actor }}
ghcr_password: ${{ secrets.ACTIONS_BOT_TOKEN }}
Expand All @@ -117,7 +117,7 @@ jobs:
${{ github.ref == 'refs/heads/development' && format('{0}/{1}:{2}', 'ghcr.io', env.IMAGE_NAME, 'development') || ''}}
${{ startsWith(github.ref, 'refs/heads/release-') && needs.calculate_version.outputs.is_latest == 'true' && format('{0}:{1}', env.IMAGE_NAME, 'latest') || ''}}
${{ startsWith(github.ref, 'refs/heads/release-') && needs.calculate_version.outputs.is_latest == 'true' && format('{0}/{1}:{2}', 'ghcr.io', env.IMAGE_NAME, 'latest') || ''}}
- uses: epam/ai-dial-ci/actions/publish_tag_release@1.8.3
- uses: epam/ai-dial-ci/actions/publish_tag_release@1.9.0
with:
tag_version: ${{ needs.calculate_version.outputs.next_version }}
changelog_file: "/tmp/my_changelog" # comes from generate_release_notes step; TODO: beautify
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/java_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
lfs: true
- uses: epam/ai-dial-ci/actions/java_prepare@1.8.3
- uses: epam/ai-dial-ci/actions/java_prepare@1.9.0
with:
java_version: ${{ inputs.java_version }}
java_distribution: ${{ inputs.java_distribution }}
Expand All @@ -65,7 +65,7 @@ jobs:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
lfs: true
- uses: epam/ai-dial-ci/actions/java_prepare@1.8.3
- uses: epam/ai-dial-ci/actions/java_prepare@1.9.0
with:
java_version: ${{ inputs.java_version }}
java_distribution: ${{ inputs.java_distribution }}
Expand All @@ -82,7 +82,7 @@ jobs:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
lfs: true
- uses: epam/ai-dial-ci/actions/ort@1.8.3
- uses: epam/ai-dial-ci/actions/ort@1.9.0
with:
bypass_checks: ${{ inputs.bypass_checks || inputs.bypass_ort }}
cli_args: "-P ort.forceOverwrite=true --stacktrace -P ort.analyzer.enabledPackageManagers=Gradle"
2 changes: 1 addition & 1 deletion .github/workflows/node_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
lfs: true
- uses: epam/ai-dial-ci/actions/build_docker@1.8.3
- uses: epam/ai-dial-ci/actions/build_docker@1.9.0
with:
image_name: ghcr.io/${{ env.IMAGE_NAME }}
image_tag: test
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/node_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
is_latest: ${{ steps.semantic_versioning.outputs.is_latest }}
latest_tag: ${{ steps.semantic_versioning.outputs.latest_tag }}
steps:
- uses: epam/ai-dial-ci/actions/semantic_versioning@1.8.3
- uses: epam/ai-dial-ci/actions/semantic_versioning@1.9.0
id: semantic_versioning

release:
Expand All @@ -94,14 +94,14 @@ jobs:
- calculate_version
- test
steps:
- uses: epam/ai-dial-ci/actions/generate_release_notes@1.8.3
- uses: epam/ai-dial-ci/actions/generate_release_notes@1.9.0
with:
latest_tag: ${{ needs.calculate_version.outputs.latest_tag }}
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
lfs: true
token: ${{ secrets.ACTIONS_BOT_TOKEN }}
- uses: epam/ai-dial-ci/actions/node_prepare@1.8.3
- uses: epam/ai-dial-ci/actions/node_prepare@1.9.0
with:
node_version: ${{ inputs.node_version }}
clean_install: true
Expand All @@ -110,7 +110,7 @@ jobs:
shell: bash
run: |
npm version ${{ needs.calculate_version.outputs.next_version }} --no-git-tag-version || true # upstream branch may already be updated
- uses: epam/ai-dial-ci/actions/build_docker@1.8.3
- uses: epam/ai-dial-ci/actions/build_docker@1.9.0
with:
ghcr_username: ${{ github.actor }}
ghcr_password: ${{ secrets.ACTIONS_BOT_TOKEN }}
Expand Down Expand Up @@ -150,7 +150,7 @@ jobs:
IS_LATEST: ${{ needs.calculate_version.outputs.is_latest == 'true' }}
IS_DEVELOPMENT_BRANCH: ${{ github.ref == 'refs/heads/development' }}
IS_RELEASE_BRANCH: ${{ startsWith(github.ref, 'refs/heads/release-') }}
- uses: epam/ai-dial-ci/actions/publish_tag_release@1.8.3
- uses: epam/ai-dial-ci/actions/publish_tag_release@1.9.0
with:
tag_version: ${{ needs.calculate_version.outputs.next_version }}
changelog_file: "/tmp/my_changelog" # comes from generate_release_notes step; TODO: beautify
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/node_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
lfs: true
- uses: epam/ai-dial-ci/actions/node_prepare@1.8.3
- uses: epam/ai-dial-ci/actions/node_prepare@1.9.0
with:
node_version: ${{ inputs.node_version }}
clean_install: "true"
Expand All @@ -69,7 +69,7 @@ jobs:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
lfs: true
- uses: epam/ai-dial-ci/actions/node_prepare@1.8.3
- uses: epam/ai-dial-ci/actions/node_prepare@1.9.0
with:
node_version: ${{ inputs.node_version }}
clean_install: "true"
Expand All @@ -86,7 +86,7 @@ jobs:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
lfs: true
- uses: epam/ai-dial-ci/actions/node_prepare@1.8.3
- uses: epam/ai-dial-ci/actions/node_prepare@1.9.0
with:
node_version: ${{ inputs.node_version }}
clean_install: "true"
Expand All @@ -103,7 +103,7 @@ jobs:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
lfs: true
- uses: epam/ai-dial-ci/actions/ort@1.8.3
- uses: epam/ai-dial-ci/actions/ort@1.9.0
with:
bypass_checks: ${{ inputs.bypass_checks || inputs.bypass_ort }}
cli_args: "-P ort.forceOverwrite=true --stacktrace -P ort.analyzer.enabledPackageManagers=NPM"
2 changes: 1 addition & 1 deletion .github/workflows/python_docker_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
lfs: true
- uses: epam/ai-dial-ci/actions/build_docker@1.8.3
- uses: epam/ai-dial-ci/actions/build_docker@1.9.0
with:
image_name: ghcr.io/${{ env.IMAGE_NAME }}
image_tag: test
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/python_docker_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
is_latest: ${{ steps.semantic_versioning.outputs.is_latest }}
latest_tag: ${{ steps.semantic_versioning.outputs.latest_tag }}
steps:
- uses: epam/ai-dial-ci/actions/semantic_versioning@1.8.3
- uses: epam/ai-dial-ci/actions/semantic_versioning@1.9.0
id: semantic_versioning

release:
Expand All @@ -81,7 +81,7 @@ jobs:
- calculate_version
- test
steps:
- uses: epam/ai-dial-ci/actions/generate_release_notes@1.8.3
- uses: epam/ai-dial-ci/actions/generate_release_notes@1.9.0
with:
latest_tag: ${{ needs.calculate_version.outputs.latest_tag }}
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
Expand All @@ -92,7 +92,7 @@ jobs:
shell: bash
run: |
sed -i "s/^version = .*/version = \"${{ needs.calculate_version.outputs.non_semver_next_version }}\"/g" pyproject.toml
- uses: epam/ai-dial-ci/actions/build_docker@1.8.3
- uses: epam/ai-dial-ci/actions/build_docker@1.9.0
with:
ghcr_username: ${{ github.actor }}
ghcr_password: ${{ secrets.ACTIONS_BOT_TOKEN }}
Expand All @@ -109,7 +109,7 @@ jobs:
${{ github.ref == 'refs/heads/development' && format('{0}/{1}:{2}', 'ghcr.io', env.IMAGE_NAME, 'development') || ''}}
${{ startsWith(github.ref, 'refs/heads/release-') && needs.calculate_version.outputs.is_latest == 'true' && format('{0}:{1}', env.IMAGE_NAME, 'latest') || ''}}
${{ startsWith(github.ref, 'refs/heads/release-') && needs.calculate_version.outputs.is_latest == 'true' && format('{0}/{1}:{2}', 'ghcr.io', env.IMAGE_NAME, 'latest') || ''}}
- uses: epam/ai-dial-ci/actions/publish_tag_release@1.8.3
- uses: epam/ai-dial-ci/actions/publish_tag_release@1.9.0
with:
tag_version: ${{ needs.calculate_version.outputs.next_version }}
changelog_file: "/tmp/my_changelog" # comes from generate_release_notes step; TODO: beautify
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/python_docker_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
lfs: true
- uses: epam/ai-dial-ci/actions/python_prepare@1.8.3
- uses: epam/ai-dial-ci/actions/python_prepare@1.9.0
with:
python_version: ${{ inputs.python_version }}
- name: Test
Expand All @@ -60,7 +60,7 @@ jobs:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
lfs: true
- uses: epam/ai-dial-ci/actions/python_prepare@1.8.3
- uses: epam/ai-dial-ci/actions/python_prepare@1.9.0
with:
python_version: ${{ inputs.python_version }}
- name: Test
Expand All @@ -76,7 +76,7 @@ jobs:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
lfs: true
- uses: epam/ai-dial-ci/actions/ort@1.8.3
- uses: epam/ai-dial-ci/actions/ort@1.9.0
with:
bypass_checks: ${{ inputs.bypass_checks || inputs.bypass_ort }}
cli_args: "-P ort.forceOverwrite=true --stacktrace -P ort.analyzer.enabledPackageManagers=Poetry"
7 changes: 6 additions & 1 deletion .github/workflows/python_package_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ on:
type: string
default: "3.11"
description: Python version to use
test_python_versions:
type: string
description: Python versions to run tests against
default: '["3.8", "3.9", "3.10", "3.11"]'

env:
IMAGE_NAME: ${{ github.repository }}
Expand All @@ -59,14 +63,15 @@ jobs:
enable_ort: ${{ inputs.enable_ort }}
bypass_ort: ${{ inputs.bypass_ort }}
python_version: ${{ inputs.python_version }}
test_python_versions: ${{ inputs.test_python_versions }}

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
lfs: true
- uses: epam/ai-dial-ci/actions/python_prepare@1.8.3
- uses: epam/ai-dial-ci/actions/python_prepare@1.9.0
with:
python_version: ${{ inputs.python_version }}
- run: make build
13 changes: 9 additions & 4 deletions .github/workflows/python_package_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ on:
type: string
default: "3.11"
description: Python version to use
test_python_versions:
type: string
description: Python versions to run tests against
default: '["3.8", "3.9", "3.10", "3.11"]'

jobs:
test:
Expand All @@ -56,14 +60,15 @@ jobs:
enable_ort: ${{ inputs.enable_ort }}
bypass_ort: ${{ inputs.bypass_ort }}
python_version: ${{ inputs.python_version }}
test_python_versions: ${{ inputs.test_python_versions }}

calculate_version:
runs-on: ubuntu-latest
outputs:
non_semver_next_version: ${{ steps.semantic_versioning.outputs.non_semver_next_version }}
latest_tag: ${{ steps.semantic_versioning.outputs.latest_tag }}
steps:
- uses: epam/ai-dial-ci/actions/semantic_versioning@1.8.3
- uses: epam/ai-dial-ci/actions/semantic_versioning@1.9.0
id: semantic_versioning

release:
Expand All @@ -76,14 +81,14 @@ jobs:
- calculate_version
- test
steps:
- uses: epam/ai-dial-ci/actions/generate_release_notes@1.8.3
- uses: epam/ai-dial-ci/actions/generate_release_notes@1.9.0
with:
latest_tag: ${{ needs.calculate_version.outputs.latest_tag }}
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
lfs: true
token: ${{ secrets.ACTIONS_BOT_TOKEN }}
- uses: epam/ai-dial-ci/actions/python_prepare@1.8.3
- uses: epam/ai-dial-ci/actions/python_prepare@1.9.0
with:
python_version: ${{ inputs.python_version }}
- name: Set version
Expand All @@ -97,7 +102,7 @@ jobs:
make publish
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
- uses: epam/ai-dial-ci/actions/publish_tag_release@1.8.3
- uses: epam/ai-dial-ci/actions/publish_tag_release@1.9.0
with:
tag_version: ${{ needs.calculate_version.outputs.non_semver_next_version }}
changelog_file: "/tmp/my_changelog" # comes from generate_release_notes step; TODO: beautify
Expand Down
Loading

0 comments on commit a4f0d85

Please sign in to comment.