Skip to content

Commit

Permalink
add Linux build Action
Browse files Browse the repository at this point in the history
Also add badge to readme and rename old action to be macOS specific
  • Loading branch information
widdowquinn committed Feb 21, 2024
1 parent f17c9ce commit bd8cc2b
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 2 deletions.
78 changes: 78 additions & 0 deletions .github/workflows/build-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: build-linux

on:
push:
branches: master
# To be able to trigger a manual build
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout Repo
uses: actions/checkout@v4

- name: Install Miniconda (Python ${{ matrix.python-version }})
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
activate-environment: pyani-github
auto-activate-base: false
channels: defaults,bioconda,conda-forge
channel-priority: flexible

- name: Check Miniconda Installation
run: |
conda info
conda list
- name: Install pip
run: python -m pip install --upgrade pip

- name: Install Development Requirements
run: conda install --file requirements-dev.txt -y

- name: Install Requirements
run: conda install --file requirements.txt -y

- name: Install third-party tools
run: conda install --file requirements-thirdparty.txt -y

- name: Install and Check FastANI
run: |
conda install --file requirements-fastani.txt -y
fastani -h
- name: Install PyQT
run: conda install --file requirements-pyqt-conda.txt -y

- name: Install pip requirements
run: pip install -r requirements-pip.txt

- name: Install pyani
run: pip install -e .

- name: Check pytest modules
run: python -m pytest -v --collect-only

- name: Run Tests with pytest
run: python -m pytest -v --cov=pyani --cov-report=xml:.coverage-${{ matrix.python-version }}.xml

- name: Upload coverage Results
uses: actions/upload-artifact@v4
with:
name: test-coverage-${{ matrix.python-version }}
path: .coverage-${{ matrix.python-version }}.xml
retention-days: 1
if: ${{ always() }}
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
run: python -m pytest -v --collect-only

- name: Run Tests with pytest
run: python -m pytest -v --cov=pyani --cov-report=xml:.coverage_fast.xml
run: python -m pytest -v --cov=pyani --cov-report=xml:.coverage-${{ matrix.python-version }}.xml

- name: Upload coverage Results
uses: actions/upload-artifact@v4
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ DOI: [10.1039/C5AY02550H](https://doi.org/10.1039/C5AY02550H)

-----

![macOS Python 3.11 build](/~https://github.com/widdowquinn/pyani/actions/workflows/build-on-push-to-master.yml/badge.svg)
![macOS Python 3.11 build](/~https://github.com/widdowquinn/pyani/actions/workflows/build-macos.yml/badge.svg)
![Linux Python 3.11 build](/~https://github.com/widdowquinn/pyani/actions/workflows/build-linux.yml/badge.svg)
[![codecov.io coverage](https://img.shields.io/codecov/c/github/widdowquinn/pyani/master.svg)](https://codecov.io/github/widdowquinn/pyani)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/f3e56b2bf118471aabf09514a3e6af75)](https://www.codacy.com/manual/widdowquinn/pyani?utm_source=github.com&utm_medium=referral&utm_content=widdowquinn/pyani&utm_campaign=Badge_Grade)
[![CodeFactor](https://www.codefactor.io/repository/github/widdowquinn/pyani/badge)](https://www.codefactor.io/repository/github/widdowquinn/pyani)
Expand Down

0 comments on commit bd8cc2b

Please sign in to comment.