From 47fefaf966e9fcbbc85cc7aae2285a75671336df Mon Sep 17 00:00:00 2001 From: farchaab Date: Tue, 20 Aug 2024 16:50:12 +0200 Subject: [PATCH] seperate macos and linux tests --- .../{unit-tests.yml => linux-tests.yml} | 5 +- .github/workflows/macos-tests.yml | 60 +++++++++++++++++++ 2 files changed, 62 insertions(+), 3 deletions(-) rename .github/workflows/{unit-tests.yml => linux-tests.yml} (94%) create mode 100644 .github/workflows/macos-tests.yml diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/linux-tests.yml similarity index 94% rename from .github/workflows/unit-tests.yml rename to .github/workflows/linux-tests.yml index 673d38b..f9174c5 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/linux-tests.yml @@ -1,4 +1,4 @@ -name: Tests +name: Linux tests on: push: @@ -31,9 +31,8 @@ jobs: strategy: fail-fast: false matrix: - os: [macos-latest, ubuntu-latest] + os: [ubuntu-latest] python-version: ["3.12"] - architecture: ["x64"] steps: - uses: "actions/checkout@v3" diff --git a/.github/workflows/macos-tests.yml b/.github/workflows/macos-tests.yml new file mode 100644 index 0000000..45c8174 --- /dev/null +++ b/.github/workflows/macos-tests.yml @@ -0,0 +1,60 @@ +name: Macos tests + +on: + push: + branches: ["main"] + paths: + - ".github/workflows/unit-tests.yaml" + - "tests/**" + - "assembly_finder/**" + - "setup.py" + pull_request: + branches: ["main"] + paths: + - ".github/workflows/unit-tests.yaml" + - "tests/**" + - "assembly_finder/**" + - "setup.py" + +permissions: + contents: read + +jobs: + tests: + name: "Python ${{ matrix.python-version }} on ${{ matrix.os }}" + runs-on: ${{ matrix.os }} + + defaults: + run: + shell: bash -el {0} + + strategy: + fail-fast: false + matrix: + os: [macos-14] + python-version: ["3.12"] + + steps: + - uses: "actions/checkout@v4" + with: + fetch-depth: 0 + + - uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + miniforge-version: "latest" + miniforge-variant: Miniforge3 + use-mamba: true + mamba-version: "*" + channels: conda-forge,bioconda,defaults + channel-priority: strict + activate-environment: assembly_finder + python-version: ${{ matrix.python-version }} + auto-activate-base: false + + - name: "Test and generate coverage report on ${{ matrix.os }} for Python ${{ matrix.python-version }}" + run: | + python -m pip install --upgrade pip + python -m pip install pytest coverage + python -m pip install . + coverage run -m pytest