From f46191a52137083dd356b510e03d16f222d9e447 Mon Sep 17 00:00:00 2001 From: Ivano Brunet Date: Tue, 3 Dec 2024 12:02:48 +0100 Subject: [PATCH] Add testing for class_refactoring_pyside6-testing branch --- .../class_refactoring_pyside6-testing.yml | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 .github/workflows/class_refactoring_pyside6-testing.yml diff --git a/.github/workflows/class_refactoring_pyside6-testing.yml b/.github/workflows/class_refactoring_pyside6-testing.yml new file mode 100644 index 0000000..dbc3084 --- /dev/null +++ b/.github/workflows/class_refactoring_pyside6-testing.yml @@ -0,0 +1,100 @@ +name: Unit Testing + +on: + push: + branches: + - 'class_refactoring_pyside6' + + +jobs: + # Linux + linux-testing: + name: Linux Unit Testing + runs-on: ubuntu-latest + defaults: + run: + shell: bash -el {0} + permissions: + checks: write + pull-requests: write + + + steps: + - name: Checkout Repo + uses: actions/checkout@v3 + + - name: Create Environment from .yml + uses: conda-incubator/setup-miniconda@v2 + with: + #mamba-version: "*" + channels: conda-forge,defaults + channel-priority: true + activate-environment: pzero-testing + environment-file: envs/std-environment.yml + # python-version: 3.8.16 + python-version: 3.8 + auto-activate-base: false + + - name: Check Conda Dependencies + run: | + conda info + conda list + + - name: Test with pytest + run: | + conda install pytest-html + pytest --html=ubu-test-report.html tests/ + + - name: Upload pytest test results + uses: actions/upload-artifact@v3 + with: + name: pytest-results-ubuntu + path: ubu-test-report.html + # Use always() to always run this step to publish test results when there are test failures + if: ${{ always() }} + + + # Windows + windows-testing: + name: Windows Unit Testing + runs-on: windows-latest + defaults: + run: + shell: bash -el {0} + permissions: + checks: write + pull-requests: write + + steps: + - name: Checkout Repo + uses: actions/checkout@v3 + + - name: Create Environment from .yml + uses: conda-incubator/setup-miniconda@v2 + with: + #mamba-version: "*" + channels: conda-forge,defaults + channel-priority: true + activate-environment: pzero-test + environment-file: envs/std-environment.yml + # python-version: 3.8.16 + python-version: 3.8 + auto-activate-base: false + + - name: Check Conda Dependencies + run: | + conda info + conda list + + - name: Test with pytest + run: | + conda install pytest-html + pytest --html=win-test-report.html tests/ + + - name: Upload pytest test results + uses: actions/upload-artifact@v3 + with: + name: pytest-results-win + path: win-test-report.html + # Use always() to always run this step to publish test results when there are test failures + if: ${{ always() }}