Skip to content

Commit

Permalink
Add github action for ci.
Browse files Browse the repository at this point in the history
  • Loading branch information
sdhutchins committed Jan 6, 2024
1 parent 5bcaffd commit 1389ee9
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Python CI

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8, 3.9]

steps:
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Cache pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
sudo apt-get install -qq phyml
pip install --upgrade pip setuptools wheel
pip install --only-binary=numpy,scipy numpy scipy
pip install matplotlib ipython jupyter sympy pytest codecov pytest-cov
pip install -r requirements.txt
pip install .
- name: Run tests
run: pytest --cov-report=xml --cov=OrthoEvol tests/

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
fail_ci_if_error: true

- name: Notify failure
if: failure()
run: echo "Build failed"

0 comments on commit 1389ee9

Please sign in to comment.