Merge pull request #122 from gbouras13/dev #446
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: [push,pull_request,workflow_dispatch] | |
jobs: | |
test_mac: | |
name: "Python ${{ matrix.python-version }}" | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
shell: bash -el {0} | |
strategy: | |
matrix: | |
os: [macos-13] #macos-latest/macos-14 is M1 - porechop-abi etc don't have M1 package builds, so fails CI | |
python-version: ["3.11"] | |
steps: | |
- uses: "actions/checkout@v3" | |
with: | |
fetch-depth: 0 | |
# Setup env | |
- uses: conda-incubator/setup-miniconda@v3 | |
with: | |
activate-environment: hybracterENV | |
environment-file: build/environment.yaml | |
python-version: ${{ matrix.python-version }} | |
auto-activate-base: false | |
auto-update-conda: true | |
- name: "Setup hybracter on ${{ matrix.os }} for Python ${{ matrix.python-version }}" | |
shell: bash -l {0} | |
run: | | |
conda install python=${{ matrix.python-version }} | |
python -m pip install --upgrade pip | |
pip install . | |
- name: "Run tests on ${{ matrix.os }} for Python ${{ matrix.python-version }}" | |
shell: bash -l {0} | |
run: | | |
export TERM=linux | |
pip install pytest | |
pytest --run_mac . | |
test_ubuntu: | |
name: "Python ${{ matrix.python-version }}" | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
shell: bash -el {0} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
python-version: ["3.11"] | |
steps: | |
- uses: "actions/checkout@v3" | |
with: | |
fetch-depth: 0 | |
# Setup env | |
- uses: conda-incubator/setup-miniconda@v3 | |
with: | |
activate-environment: hybracterENV | |
environment-file: build/environment.yaml | |
python-version: ${{ matrix.python-version }} | |
auto-activate-base: false | |
channel-priority: strict | |
channels: conda-forge,bioconda,defaults,anaconda | |
auto-update-conda: true | |
- name: "Setup hybracter on ${{ matrix.os }} for Python ${{ matrix.python-version }}" | |
shell: bash -l {0} | |
run: | | |
conda install python=${{ matrix.python-version }} | |
python -m pip install --upgrade pip | |
pip install . | |
- name: "Run tests and generate coverage report on ${{ matrix.os }} for Python ${{ matrix.python-version }}" | |
shell: bash -l {0} | |
run: | | |
export TERM=linux | |
pip install pytest pytest-cov | |
pytest --cov=./ --cov-report xml --cov-report lcov --cov-append | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v3 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |