From f4756b751edf20547dc9eecfacd8fe9397b3ed71 Mon Sep 17 00:00:00 2001 From: Roberto Rossini <71787608+robomics@users.noreply.github.com> Date: Fri, 20 Sep 2024 19:15:37 +0200 Subject: [PATCH] Add worklow to run integration test units --- .github/workflows/integration-test-units.yml | 63 ++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 .github/workflows/integration-test-units.yml diff --git a/.github/workflows/integration-test-units.yml b/.github/workflows/integration-test-units.yml new file mode 100644 index 00000000..21409647 --- /dev/null +++ b/.github/workflows/integration-test-units.yml @@ -0,0 +1,63 @@ +# Copyright (C) 2024 Roberto Rossini (roberros@uio.no) +# SPDX-License-Identifier: MIT + +name: Run hictk_integration_suite unit tests + +on: + push: + branches: [main] + paths: + - ".github/workflows/integration-test-units.yml" + - "test/integration/**" + + pull_request: + paths: + - ".github/workflows/integration-test-units.yml" + - "test/integration/**" + +# https://stackoverflow.com/a/72408109 +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +defaults: + run: + shell: bash + +jobs: + hictk-integration-suite-units: + strategy: + fail-fast: false + matrix: + platform: [windows-latest, macos-latest, ubuntu-latest] + python-version: ["3.11", "3.12"] + + runs-on: ${{ matrix.platform }} + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + cache-dependency-path: "test/integration/pyproject.toml" + cache: "pip" + + - name: Install package + run: | + pip install 'test/integration[test]' -v + + - name: Run tests + run: | + python -m pytest 'test/integration/test' -v + + hictk-integration-suite-units-status-check: + name: Status Check (hictk_integration_suite unit tests) + if: ${{ always() }} + runs-on: ubuntu-latest + needs: + - hictk-integration-suite-units + + steps: + - name: Collect job results + if: needs.hictk-integration-suite-units.result != 'success' + run: exit 1