From bf47308c0065b8cd6fc16d14996fffe06e5d947d Mon Sep 17 00:00:00 2001 From: Sadra Barikbin Date: Tue, 2 Jan 2024 23:07:30 +0330 Subject: [PATCH 1/8] Add report_tests workflow --- .github/workflows/test.yml | 20 ++++---------------- .github/workflows/test_report.yml | 20 ++++++++++++++++++++ 2 files changed, 24 insertions(+), 16 deletions(-) create mode 100644 .github/workflows/test_report.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0f8485a..5c592ff 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,4 +1,4 @@ -name: test +name: Test on: @@ -29,9 +29,6 @@ jobs: runs-on: "ubuntu-latest" - env: - test_results_dir: test-results-${{ matrix.python-version }} - steps: - name: Set up Python uses: actions/setup-python@v4 @@ -52,19 +49,10 @@ jobs: - name: Test run: | cd src - mkdir -p ../$test_results_dir - python3 -m pytest --junitxml=../$test_results_dir/junit.xml -o junit_family=legacy + python3 -m pytest --junitxml=../junit.xml -o junit_family=legacy - name: Upload test results uses: actions/upload-artifact@v3 if: success() || failure() with: - name: ${{ env.test_results_dir }} - path: ${{ env.test_results_dir }} - - - name: Report tests - uses: dorny/test-reporter@v1 - if: success() || failure() - with: - name: Results on Python ${{ matrix.python-version }} - path: "${{env.test_results_dir }}/junit.xml" - reporter: java-junit + name: test-results-${{matrix.python-version}} + path: junit.xml diff --git a/.github/workflows/test_report.yml b/.github/workflows/test_report.yml new file mode 100644 index 0000000..f237661 --- /dev/null +++ b/.github/workflows/test_report.yml @@ -0,0 +1,20 @@ +name: 'Test Report' +on: + workflow_run: + workflows: ['test'] + types: + - completed +permissions: + contents: read + actions: read + checks: write +jobs: + report: + runs-on: ubuntu-latest + steps: + - uses: dorny/test-reporter@v1 + with: + artifact: /test-results-.*/ + name: Tests Results + path: 'junit.xml' + reporter: jest-junit \ No newline at end of file From c90a61c12c9a462da7b89b5b83a32b4ada0824e9 Mon Sep 17 00:00:00 2001 From: Sadra Barikbin Date: Wed, 3 Jan 2024 22:40:43 +0330 Subject: [PATCH 2/8] Fix a few typos --- src/dinglehopper/character_error_rate.py | 2 +- src/dinglehopper/edit_distance.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/dinglehopper/character_error_rate.py b/src/dinglehopper/character_error_rate.py index c0e3fe1..5e2e02c 100644 --- a/src/dinglehopper/character_error_rate.py +++ b/src/dinglehopper/character_error_rate.py @@ -1,5 +1,5 @@ import unicodedata -from typing import Tuple, List +from typing import List, Tuple from multimethod import multimethod from uniseg.graphemecluster import grapheme_clusters diff --git a/src/dinglehopper/edit_distance.py b/src/dinglehopper/edit_distance.py index 8eec5e2..af1e047 100644 --- a/src/dinglehopper/edit_distance.py +++ b/src/dinglehopper/edit_distance.py @@ -3,6 +3,7 @@ from typing import List from multimethod import multimethod from rapidfuzz.distance import Levenshtein +from typing import List from uniseg.graphemecluster import grapheme_clusters from .extracted_text import ExtractedText From 6884c5c82579cebe5faeecd15701dd7c13c949dd Mon Sep 17 00:00:00 2001 From: Sadra Barikbin Date: Wed, 3 Jan 2024 23:16:43 +0330 Subject: [PATCH 3/8] Update dorny dependency --- .github/workflows/test_report.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_report.yml b/.github/workflows/test_report.yml index f237661..d1ea24d 100644 --- a/.github/workflows/test_report.yml +++ b/.github/workflows/test_report.yml @@ -12,7 +12,7 @@ jobs: report: runs-on: ubuntu-latest steps: - - uses: dorny/test-reporter@v1 + - uses: dorny/test-reporter@v1.7.0 with: artifact: /test-results-.*/ name: Tests Results From 4413ddac8f0b67e186cc39c74fcef92c30820b70 Mon Sep 17 00:00:00 2001 From: Sadra Barikbin Date: Wed, 3 Jan 2024 23:28:33 +0330 Subject: [PATCH 4/8] Temporary commit --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5c592ff..3dba451 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -25,7 +25,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12" ] + python-version: [ "3.12" ] runs-on: "ubuntu-latest" From f4ff6a8f31f56e66c887ea7908f5b2f46030db6a Mon Sep 17 00:00:00 2001 From: Sadra Barikbin Date: Sat, 6 Jan 2024 23:39:56 +0330 Subject: [PATCH 5/8] Change reporter --- .github/workflows/test.yml | 2 +- .github/workflows/test_report.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3dba451..5c592ff 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -25,7 +25,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: [ "3.12" ] + python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12" ] runs-on: "ubuntu-latest" diff --git a/.github/workflows/test_report.yml b/.github/workflows/test_report.yml index d1ea24d..96b33fa 100644 --- a/.github/workflows/test_report.yml +++ b/.github/workflows/test_report.yml @@ -17,4 +17,4 @@ jobs: artifact: /test-results-.*/ name: Tests Results path: 'junit.xml' - reporter: jest-junit \ No newline at end of file + reporter: java-junit \ No newline at end of file From 967f833eac5d3b54a79d8ecac8e78df3800eacfb Mon Sep 17 00:00:00 2001 From: Sadra Barikbin Date: Sat, 6 Jan 2024 23:50:58 +0330 Subject: [PATCH 6/8] Improve report --- .github/workflows/test.yml | 4 ++-- .github/workflows/test_report.yml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5c592ff..9b95bff 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -49,10 +49,10 @@ jobs: - name: Test run: | cd src - python3 -m pytest --junitxml=../junit.xml -o junit_family=legacy + python3 -m pytest --junitxml=../${{matrix.python-version}}-junit.xml -o junit_family=legacy - name: Upload test results uses: actions/upload-artifact@v3 if: success() || failure() with: name: test-results-${{matrix.python-version}} - path: junit.xml + path: ${{matrix.python-version}}-junit.xml diff --git a/.github/workflows/test_report.yml b/.github/workflows/test_report.yml index 96b33fa..253429f 100644 --- a/.github/workflows/test_report.yml +++ b/.github/workflows/test_report.yml @@ -14,7 +14,7 @@ jobs: steps: - uses: dorny/test-reporter@v1.7.0 with: - artifact: /test-results-.*/ - name: Tests Results - path: 'junit.xml' + artifact: /test-results-(.*)/ + name: 'Tests Results - $1' + path: '*junit.xml' reporter: java-junit \ No newline at end of file From 4466422cda9fa655c74c1f21ef434453e18f8cf9 Mon Sep 17 00:00:00 2001 From: Sadra Barikbin Date: Sun, 7 Jan 2024 00:08:18 +0330 Subject: [PATCH 7/8] Fix a typo --- src/dinglehopper/edit_distance.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/dinglehopper/edit_distance.py b/src/dinglehopper/edit_distance.py index af1e047..8eec5e2 100644 --- a/src/dinglehopper/edit_distance.py +++ b/src/dinglehopper/edit_distance.py @@ -3,7 +3,6 @@ from typing import List from multimethod import multimethod from rapidfuzz.distance import Levenshtein -from typing import List from uniseg.graphemecluster import grapheme_clusters from .extracted_text import ExtractedText From 59a3882ce5fb9b0bb1c2f92148e06965d952f13b Mon Sep 17 00:00:00 2001 From: Mike Gerber Date: Mon, 8 Jan 2024 17:57:51 +0100 Subject: [PATCH 8/8] =?UTF-8?q?=F0=9F=A7=B9=20GitHub=20Actions:=20Clean=20?= =?UTF-8?q?up=20whitespace?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test_report.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_report.yml b/.github/workflows/test_report.yml index 253429f..908a593 100644 --- a/.github/workflows/test_report.yml +++ b/.github/workflows/test_report.yml @@ -17,4 +17,4 @@ jobs: artifact: /test-results-(.*)/ name: 'Tests Results - $1' path: '*junit.xml' - reporter: java-junit \ No newline at end of file + reporter: java-junit