From 780201fbbfdbcb2d1ea014c1c943c89ed3e724fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CChisanan232=E2=80=9D?= Date: Sat, 26 Nov 2022 07:48:22 +0800 Subject: [PATCH 1/8] [Breaking Change] (config) Modify the strategy-matrix settings. --- .../workflows/run_test_items_via_pytest.yaml | 27 +++++++------------ 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/.github/workflows/run_test_items_via_pytest.yaml b/.github/workflows/run_test_items_via_pytest.yaml index 7ef7b8dd..1dc79daa 100644 --- a/.github/workflows/run_test_items_via_pytest.yaml +++ b/.github/workflows/run_test_items_via_pytest.yaml @@ -76,32 +76,23 @@ jobs: strategy: matrix: python-version: [3.6,3.7,3.8,3.9,'3.10','3.11'] - os: [ubuntu-latest,macos-latest] + os: [ubuntu-20.04,ubuntu-latest,macos-latest] exclude: - - os: ubuntu-18.04 + - os: ubuntu-latest python-version: 3.6 - - os: ubuntu-18.04 - python-version: 3.9 - - os: ubuntu-18.04 - python-version: '3.10' - os: ubuntu-20.04 - python-version: 3.8 + python-version: 3.7 - os: ubuntu-20.04 - python-version: 3.9 - - os: ubuntu-22.04 - python-version: 3.6 - - os: macos-10.15 - python-version: 3.6 - - os: macos-10.15 python-version: 3.8 - - os: macos-11 - python-version: 3.6 - - os: macos-11 + - os: ubuntu-20.04 python-version: 3.9 - - os: macos-12 - python-version: 3.6 + - os: ubuntu-20.04 + python-version: '3.10' + - os: ubuntu-20.04 + python-version: 3.11 test-path: ${{fromJson(inputs.all_test_items_paths)}} + steps: - uses: actions/checkout@v3 From 4bd2c7f1064045abbfa71efd5133d4add9f7f129 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CChisanan232=E2=80=9D?= Date: Sat, 26 Nov 2022 07:50:22 +0800 Subject: [PATCH 2/8] [Breaking Change] (config) Remove debug mode for testing. --- .github/workflows/test_python_project_ci_one-test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_python_project_ci_one-test.yaml b/.github/workflows/test_python_project_ci_one-test.yaml index b1bdd082..398dc2aa 100644 --- a/.github/workflows/test_python_project_ci_one-test.yaml +++ b/.github/workflows/test_python_project_ci_one-test.yaml @@ -42,7 +42,7 @@ jobs: with: test_type: unit-test all_test_items_paths: ${{needs.prep-testbed_unit-test.outputs.all_test_items}} - debug_mode: true +# debug_mode: true unit-test_codecov: From cc28790e9df85e2caf077d87a5c345304830b100 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CChisanan232=E2=80=9D?= Date: Sat, 26 Nov 2022 09:19:17 +0800 Subject: [PATCH 3/8] [Debug] (config) Print log message about file tree. --- .../workflows/organize_and_generate_test_cov_reports.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/organize_and_generate_test_cov_reports.yaml b/.github/workflows/organize_and_generate_test_cov_reports.yaml index 1466f773..4999a1ef 100644 --- a/.github/workflows/organize_and_generate_test_cov_reports.yaml +++ b/.github/workflows/organize_and_generate_test_cov_reports.yaml @@ -58,7 +58,10 @@ jobs: - name: Combine all testing code coverage result files with all test types if: ${{ inputs.test_type == 'all-test' }} - run: coverage combine --data-file=.coverage.${{ inputs.test_type }} .coverage.* + run: | + pwd + ls -la + coverage combine --data-file=.coverage.${{ inputs.test_type }} .coverage.* - name: Report testing coverage of project code run: coverage report -m --data-file=.coverage.${{ inputs.test_type }} From 839fc83ec546f2e5727a1c9e01cc605f77deb952 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CChisanan232=E2=80=9D?= Date: Sat, 26 Nov 2022 09:32:27 +0800 Subject: [PATCH 4/8] [Debug] (config) Print log message about file tree. --- .../organize_and_generate_test_cov_reports.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/organize_and_generate_test_cov_reports.yaml b/.github/workflows/organize_and_generate_test_cov_reports.yaml index 4999a1ef..b3f6914c 100644 --- a/.github/workflows/organize_and_generate_test_cov_reports.yaml +++ b/.github/workflows/organize_and_generate_test_cov_reports.yaml @@ -54,14 +54,14 @@ jobs: - name: Combine all testing code coverage result files with one specific test type if: ${{ inputs.test_type == 'unit-test' || inputs.test_type == 'integration-test' }} - run: coverage combine --data-file=.coverage.${{ inputs.test_type }} .coverage.${{ inputs.test_type }}.* - - - name: Combine all testing code coverage result files with all test types - if: ${{ inputs.test_type == 'all-test' }} run: | pwd ls -la - coverage combine --data-file=.coverage.${{ inputs.test_type }} .coverage.* + coverage combine --data-file=.coverage.${{ inputs.test_type }} .coverage.${{ inputs.test_type }}.* + + - name: Combine all testing code coverage result files with all test types + if: ${{ inputs.test_type == 'all-test' }} + run: coverage combine --data-file=.coverage.${{ inputs.test_type }} .coverage.* - name: Report testing coverage of project code run: coverage report -m --data-file=.coverage.${{ inputs.test_type }} From 4dd3b8cb402da3ef2f2dbf2c5f32feaef6d621f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CChisanan232=E2=80=9D?= Date: Sat, 26 Nov 2022 09:38:28 +0800 Subject: [PATCH 5/8] [Debug] (config) Print log message about file tree. --- .../workflows/organize_and_generate_test_cov_reports.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/organize_and_generate_test_cov_reports.yaml b/.github/workflows/organize_and_generate_test_cov_reports.yaml index b3f6914c..39ffdb05 100644 --- a/.github/workflows/organize_and_generate_test_cov_reports.yaml +++ b/.github/workflows/organize_and_generate_test_cov_reports.yaml @@ -64,7 +64,11 @@ jobs: run: coverage combine --data-file=.coverage.${{ inputs.test_type }} .coverage.* - name: Report testing coverage of project code - run: coverage report -m --data-file=.coverage.${{ inputs.test_type }} + run: | + pwd + ls -la + ls -la ./test_gh_workflow + coverage report -m --data-file=.coverage.${{ inputs.test_type }} - name: General testing coverage report as XML format with ${{ inputs.test_type }} run: coverage xml --data-file=.coverage.${{ inputs.test_type }} -o coverage_${{ inputs.test_type }}.xml From a0ebf9b1fc41e6bfafe45457a830c815861e6bb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CChisanan232=E2=80=9D?= Date: Sat, 26 Nov 2022 09:45:18 +0800 Subject: [PATCH 6/8] [Test] (config) Modify coverage setting to use relative path. --- .coveragerc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.coveragerc b/.coveragerc index b6ca4893..33055ce4 100644 --- a/.coveragerc +++ b/.coveragerc @@ -5,3 +5,6 @@ source=./test_gh_workflow omit = */__init__.py + +[path] +source=./test_gh_workflow From c6105c578337a4100febf82b20cb52436adb5c46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CChisanan232=E2=80=9D?= Date: Sat, 26 Nov 2022 14:31:02 +0800 Subject: [PATCH 7/8] [Test] (config) Modify the running commands. --- .../organize_and_generate_test_cov_reports.yaml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/organize_and_generate_test_cov_reports.yaml b/.github/workflows/organize_and_generate_test_cov_reports.yaml index 39ffdb05..52ced74c 100644 --- a/.github/workflows/organize_and_generate_test_cov_reports.yaml +++ b/.github/workflows/organize_and_generate_test_cov_reports.yaml @@ -55,20 +55,15 @@ jobs: - name: Combine all testing code coverage result files with one specific test type if: ${{ inputs.test_type == 'unit-test' || inputs.test_type == 'integration-test' }} run: | - pwd - ls -la coverage combine --data-file=.coverage.${{ inputs.test_type }} .coverage.${{ inputs.test_type }}.* + coverage report -m --data-file=.coverage.${{ inputs.test_type }} - name: Combine all testing code coverage result files with all test types if: ${{ inputs.test_type == 'all-test' }} run: coverage combine --data-file=.coverage.${{ inputs.test_type }} .coverage.* - name: Report testing coverage of project code - run: | - pwd - ls -la - ls -la ./test_gh_workflow - coverage report -m --data-file=.coverage.${{ inputs.test_type }} + run: coverage report -m --data-file=.coverage.${{ inputs.test_type }} - name: General testing coverage report as XML format with ${{ inputs.test_type }} run: coverage xml --data-file=.coverage.${{ inputs.test_type }} -o coverage_${{ inputs.test_type }}.xml From d1e19a8379d290b1f403683cb8bd38ed6b0314ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CChisanan232=E2=80=9D?= Date: Sat, 26 Nov 2022 14:43:37 +0800 Subject: [PATCH 8/8] [Test] (config) Back to original setting. --- .github/workflows/organize_and_generate_test_cov_reports.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/organize_and_generate_test_cov_reports.yaml b/.github/workflows/organize_and_generate_test_cov_reports.yaml index 52ced74c..1466f773 100644 --- a/.github/workflows/organize_and_generate_test_cov_reports.yaml +++ b/.github/workflows/organize_and_generate_test_cov_reports.yaml @@ -54,9 +54,7 @@ jobs: - name: Combine all testing code coverage result files with one specific test type if: ${{ inputs.test_type == 'unit-test' || inputs.test_type == 'integration-test' }} - run: | - coverage combine --data-file=.coverage.${{ inputs.test_type }} .coverage.${{ inputs.test_type }}.* - coverage report -m --data-file=.coverage.${{ inputs.test_type }} + run: coverage combine --data-file=.coverage.${{ inputs.test_type }} .coverage.${{ inputs.test_type }}.* - name: Combine all testing code coverage result files with all test types if: ${{ inputs.test_type == 'all-test' }}