From 9989e3b0b18fc289b55d81d51b661cab8fc3bd4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CChisanan232=E2=80=9D?= Date: Mon, 31 Oct 2022 13:27:27 +0800 Subject: [PATCH 1/6] [Breaking Change] (config) 2 changes: 1. Remove deprecated runtime OS version. 2. Add new Python version '3.11'. --- .github/workflows/run_test_items_via_pytest.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run_test_items_via_pytest.yaml b/.github/workflows/run_test_items_via_pytest.yaml index 082274db..6b2b28f2 100644 --- a/.github/workflows/run_test_items_via_pytest.yaml +++ b/.github/workflows/run_test_items_via_pytest.yaml @@ -75,8 +75,8 @@ jobs: strategy: matrix: - python-version: [3.6,3.7,3.8,3.9,'3.10'] - os: [ubuntu-18.04,ubuntu-20.04,ubuntu-22.04,macos-10.15,macos-11,macos-12] + python-version: [3.6,3.7,3.8,3.9,'3.10','3.11'] + os: [ubuntu-latest,macos-latest] exclude: - os: ubuntu-18.04 python-version: 3.6 From 6f0ade40e6c4460131f0160a41adecb5c41a50f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CChisanan232=E2=80=9D?= Date: Mon, 31 Oct 2022 20:24:37 +0800 Subject: [PATCH 2/6] [Refactor] (config) Upgrade the GitHub Action syntax usage about set-output commands. --- .github/workflows/prepare_test_items.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/prepare_test_items.yaml b/.github/workflows/prepare_test_items.yaml index 3e3d43d5..5a4ca7f6 100644 --- a/.github/workflows/prepare_test_items.yaml +++ b/.github/workflows/prepare_test_items.yaml @@ -43,5 +43,5 @@ jobs: - id: set-matrix run: | sudo apt-get install jq - echo "::set-output name=all_test_items::$(bash ${{ inputs.shell_path }} ${{ inputs.shell_arg }})" + echo "all_test_items=$(bash ${{ inputs.shell_path }} ${{ inputs.shell_arg }})" >> $GITHUB_OUTPUT From 4b4b09ac47d7f94305fcfd4c804ee78bf3d9d42b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CChisanan232=E2=80=9D?= Date: Mon, 31 Oct 2022 21:31:10 +0800 Subject: [PATCH 3/6] [Refactor] (config) Upgrade the GitHub Action syntax usage about set-output commands. --- .../workflows/build_git-tag_and_create_github-release.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_git-tag_and_create_github-release.yaml b/.github/workflows/build_git-tag_and_create_github-release.yaml index 2536aa2c..9c33b5e6 100644 --- a/.github/workflows/build_git-tag_and_create_github-release.yaml +++ b/.github/workflows/build_git-tag_and_create_github-release.yaml @@ -88,7 +88,7 @@ jobs: release_type=$(echo "$release" | grep -E "\[Python\] \[Final Running Result\] ((Official\-Release)|(Pre\-Release))" | grep -E -o "((Official\-Release)|(Pre\-Release))") echo "๐Ÿ Release Type: $release_type" - echo "::set-output name=release_type::$(echo $release_type)" + echo "release_type=$(echo $release_type)" >> $GITHUB_OUTPUT env: GITHUB_TOKEN: ${{ secrets.github_auth_token }} @@ -103,7 +103,7 @@ jobs: release_version=$(echo "$release" | grep -E "\[GitHub Action - Reusable workflow\] \[Final Running Result\] (Official\-Release and version: ([0-9]{1,})|(Pre\-Release))" | grep -E -o "(([0-9]{1,})|(Pre\-Release))") echo "๐Ÿค– Release Version: $release_version" - echo "::set-output name=release_version::$(echo $release_version)" + echo "release_version=$(echo $release_version)" >> $GITHUB_OUTPUT env: GITHUB_TOKEN: ${{ secrets.github_auth_token }} From 401b8de142f903c4beb05e8e2e85a26e7c97d1ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CChisanan232=E2=80=9D?= Date: Mon, 31 Oct 2022 21:41:44 +0800 Subject: [PATCH 4/6] [Refactor] (config) Upgrade all the actions (checkout, setup-python) version. --- .../build_git-tag_and_create_github-release.yaml | 2 +- .github/workflows/ci-cd.yaml | 2 +- .../workflows/organize_and_generate_test_cov_reports.yaml | 4 ++-- .github/workflows/run_test_items_via_pytest.yaml | 8 ++++---- .github/workflows/test_gh_reusable_workflow.yaml | 2 +- .github/workflows/test_python_project_ci_multi-tests.yaml | 2 +- .github/workflows/test_python_project_ci_one-test.yaml | 2 +- .github/workflows/upload_test_cov_report.yaml | 6 ++++-- 8 files changed, 15 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build_git-tag_and_create_github-release.yaml b/.github/workflows/build_git-tag_and_create_github-release.yaml index 9c33b5e6..f0e69f9b 100644 --- a/.github/workflows/build_git-tag_and_create_github-release.yaml +++ b/.github/workflows/build_git-tag_and_create_github-release.yaml @@ -72,7 +72,7 @@ jobs: matrix_github_action_reusable_workflow: ${{ steps.github_action_reusable_workflow_release.outputs.release_version }} steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Download shell script for checking input parameters run: curl https://raw.githubusercontent.com/Chisanan232/GitHub-Action_Workflow-Template-Python/develop/scripts/ci/build_git-tag_or_create_github-release.sh --output ./scripts/ci/build_git-tag_or_create_github-release.sh diff --git a/.github/workflows/ci-cd.yaml b/.github/workflows/ci-cd.yaml index 672471ad..37b92682 100644 --- a/.github/workflows/ci-cd.yaml +++ b/.github/workflows/ci-cd.yaml @@ -45,7 +45,7 @@ jobs: RELEASE_TYPE: ${{ needs.test_build_git-tag_and_create_github-release.outputs.github-action_reusable_workflow_release_version }} DEBUG_MODE: false steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Check it whether get the output of previous one job which has version info or not run: bash scripts/ci/check_getting_output.sh diff --git a/.github/workflows/organize_and_generate_test_cov_reports.yaml b/.github/workflows/organize_and_generate_test_cov_reports.yaml index 882968b7..1466f773 100644 --- a/.github/workflows/organize_and_generate_test_cov_reports.yaml +++ b/.github/workflows/organize_and_generate_test_cov_reports.yaml @@ -31,7 +31,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Download code coverage result file uses: actions/download-artifact@v3 @@ -40,7 +40,7 @@ jobs: path: ./ - name: Setup Python 3.10 in Ubuntu OS - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: '3.10' diff --git a/.github/workflows/run_test_items_via_pytest.yaml b/.github/workflows/run_test_items_via_pytest.yaml index 6b2b28f2..7ef7b8dd 100644 --- a/.github/workflows/run_test_items_via_pytest.yaml +++ b/.github/workflows/run_test_items_via_pytest.yaml @@ -103,10 +103,10 @@ jobs: test-path: ${{fromJson(inputs.all_test_items_paths)}} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Install Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} @@ -151,10 +151,10 @@ jobs: test-path: ${{fromJson(inputs.all_test_items_paths)}} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Install Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/test_gh_reusable_workflow.yaml b/.github/workflows/test_gh_reusable_workflow.yaml index 1f91e6e7..6cf75b50 100644 --- a/.github/workflows/test_gh_reusable_workflow.yaml +++ b/.github/workflows/test_gh_reusable_workflow.yaml @@ -48,7 +48,7 @@ jobs: env: RELEASE_TYPE: ${{ needs.test_build_git-tag_and_create_github-release.outputs.github-action_reusable_workflow_release_version }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Check it whether get the output of previous one job which has version info or not run: bash scripts/ci/check_getting_output.sh diff --git a/.github/workflows/test_python_project_ci_multi-tests.yaml b/.github/workflows/test_python_project_ci_multi-tests.yaml index ec33747d..78d158ee 100644 --- a/.github/workflows/test_python_project_ci_multi-tests.yaml +++ b/.github/workflows/test_python_project_ci_multi-tests.yaml @@ -154,7 +154,7 @@ jobs: RELEASE_TYPE: ${{ needs.build_git-tag_and_create_github-release.outputs.python_release_version }} steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Check it whether get the output of previous one job which has version info or not run: bash scripts/ci/check_getting_output.sh diff --git a/.github/workflows/test_python_project_ci_one-test.yaml b/.github/workflows/test_python_project_ci_one-test.yaml index f02d62a2..b1bdd082 100644 --- a/.github/workflows/test_python_project_ci_one-test.yaml +++ b/.github/workflows/test_python_project_ci_one-test.yaml @@ -123,7 +123,7 @@ jobs: RELEASE_TYPE: ${{ needs.build_git-tag_and_create_github-release.outputs.python_release_version }} steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Check it whether get the output of previous one job which has version info or not run: bash scripts/ci/check_getting_output.sh diff --git a/.github/workflows/upload_test_cov_report.yaml b/.github/workflows/upload_test_cov_report.yaml index b83755d3..ed6f8b8b 100644 --- a/.github/workflows/upload_test_cov_report.yaml +++ b/.github/workflows/upload_test_cov_report.yaml @@ -80,7 +80,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Download shell script for checking input parameters run: curl https://raw.githubusercontent.com/Chisanan232/GitHub-Action_Workflow-Template-Python/develop/scripts/ci/check-input-params.sh --output ./scripts/ci/check-input-params.sh @@ -96,12 +96,14 @@ jobs: echo "Check the parameters of uploading report to Codacy ..." bash ./scripts/ci/check-input-params.sh ${{ inputs.upload-to-codacy }} ${{ secrets.codacy_token }} + # TODO: It's possible be better that open input parameter 'file_path' or 'download name' outside. - name: Download code coverage result files which has be handled by different test type process uses: actions/download-artifact@v3 with: name: test_coverage_report path: ${{ inputs.download_path }} + # TODO: It's possible be better that open input parameter 'file_path' or 'download name' outside. - name: Download code coverage result files which has be handled by different test type process uses: actions/download-artifact@v3 with: @@ -110,7 +112,7 @@ jobs: - name: Install Python 3.10 if: ${{ inputs.upload-to-codecov == true || inputs.upload-to-coveralls == true }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: "3.10" From 90ebe9ea3241ffc23cc48c00604e6d609333a79f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CChisanan232=E2=80=9D?= Date: Mon, 31 Oct 2022 22:22:51 +0800 Subject: [PATCH 5/6] [Breaking Change] (config) Modify the GitHub release title for releasing. --- .github/release-title.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/release-title.md b/.github/release-title.md index 112843c8..2e8aed9c 100644 --- a/.github/release-title.md +++ b/.github/release-title.md @@ -1 +1 @@ -v2.0.0 - More short and clear <0001f9f9>๐Ÿป \ No newline at end of file +v3.0.0 - Modify under testing OS & Python versions and upgrade dependencies actions ๐Ÿป \ No newline at end of file From 6bce9b5e701fb39ff5a4f7a19bdc5162e9efce38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CChisanan232=E2=80=9D?= Date: Mon, 31 Oct 2022 22:23:04 +0800 Subject: [PATCH 6/6] [Breaking Change] (config) Modify the GitHub release content for releasing. --- .github/release-notes.md | 43 +++++++++++++++++++++++++++++++--------- 1 file changed, 34 insertions(+), 9 deletions(-) diff --git a/.github/release-notes.md b/.github/release-notes.md index 753535fa..682939a7 100644 --- a/.github/release-notes.md +++ b/.github/release-notes.md @@ -1,17 +1,42 @@ -### ๐ŸŽ‰๐ŸŽŠ๐Ÿพ New feature -
+[//]: # (### ๐ŸŽ‰๐ŸŽŠ๐Ÿพ New feature) + +[//]: # (
) -1. Add new options about set up and run a sample HTTP server for testing if it needs in some testing scenario (_run_test_items_via_pytest.yaml_). +[//]: # () +[//]: # (1. Add new options about set up and run a sample HTTP server for testing if it needs in some testing scenario (_run_test_items_via_pytest.yaml_).) +[//]: # () ### ๐Ÿ› โš™๏ธ๐Ÿ”ฉ **Breaking Change**
-1. Integrate the feature about organizing and generating testing coverage reports into a reusable workflow. So workflow could be shorter and clear (_organize_and_generate_test_cov_reports.yaml_). -2. Integrate all the uploading test coverage report features into a reusable workflow (_upload_test_cov_report.yaml_). -3. Update document README. -4. Move the PR template to **_.github_** directory (for working finely). +1. Clear the under testing environments or settings to reduce resource. + + 1-1. Deprecate and remove some runtime OS versions. + + * Deprecated settings: _ubuntu-18.04_, _ubuntu-20.04_, _ubuntu-22.04_, _macos-10.15_, _macos-11_, _macos-12_ + * New settings: _ubuntu-latest_, _macos-latest_ + + 1-2. Add more Python version for testing + + * New version: _Python 3.11_ -### โš’โš’๐Ÿ’ฃ **Bug Fix** +[//]: # (### โš’โš’๐Ÿ’ฃ **Bug Fix** ) + +[//]: # (
) + +[//]: # () +[//]: # (1. Fix the issue about uploading test coverage report cannot work at all.) + +### ๐Ÿ”ฌ๐Ÿงช๐Ÿงฌ **Refactor**
-1. Fix the issue about uploading test coverage report cannot work at all. +1. Upgrade the GitHub Action syntax usage about set-output commands. + + * Change to use environment variable _GITHUB_OUTPUT_. + * Refer: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/ + +2. Upgrade the actions which depends on Node.JS version 12 to newer version. + + * Upgrade _actions/checkout_ to version 3. + * Upgrade _actions/setup-python_ to version 4. + * Refer: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/