From 378458f26ae7facb84a5e290d0ec4089fe6f0e17 Mon Sep 17 00:00:00 2001 From: Mani Sarkar Date: Mon, 13 Mar 2023 04:35:33 +0000 Subject: [PATCH] CI: passing the Windows/Python specific Unicode environment variables before running the testscript --- .github/workflows/end-to-end-flow.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/end-to-end-flow.yml b/.github/workflows/end-to-end-flow.yml index accb757..25902c7 100644 --- a/.github/workflows/end-to-end-flow.yml +++ b/.github/workflows/end-to-end-flow.yml @@ -57,7 +57,9 @@ jobs: - name: install-line-profiler-on-windows-python-3.7 run: | ### https://stackoverflow.com/questions/5419/python-unicode-and-the-windows-console + ### https://github.com/conda/conda/issues/7445#issuecomment-774579800 set PYTHONIOENCODING="utf-8" + set PYTHONLEGACYWINDOWSSTDIO="utf-8" pip install win-unicode-console python -m pip install line-profiler@https://github.com/neomatrix369/nlp_profiler/releases/download/v0.0.2-dev/line_profiler-3.2.6-cp37-cp37m-win_amd64.whl if: matrix.python-version == '3.7' && matrix.os == 'windows-latest' @@ -65,7 +67,9 @@ jobs: - name: install-line-profiler-on-windows-python-3.8 run: | ### https://stackoverflow.com/questions/5419/python-unicode-and-the-windows-console + ### https://github.com/conda/conda/issues/7445#issuecomment-774579800 set PYTHONIOENCODING="utf-8" + set PYTHONLEGACYWINDOWSSTDIO="utf-8" pip install win-unicode-console python -m pip install line-profiler@https://github.com/neomatrix369/nlp_profiler/releases/download/v0.0.2-dev/line_profiler-3.2.6-cp38-cp38-win_amd64.whl if: matrix.python-version == '3.8' && matrix.os == 'windows-latest' @@ -77,7 +81,7 @@ jobs: - name: run-test-coverage-shell-script shell: bash run: | - ./test-coverage.sh "tests slow-tests" + PYTHONIOENCODING="utf-8" PYTHONLEGACYWINDOWSSTDIO="utf-8" ./test-coverage.sh "tests slow-tests" - name: Upload coverage to Codecov uses: codecov/codecov-action@v1 if: matrix.python-version == '3.8' && matrix.os == 'ubuntu-18.04'