Skip to content

Commit

Permalink
Create ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
balajtimate authored Oct 5, 2023
1 parent cf57921 commit 4247366
Showing 1 changed file with 88 additions and 0 deletions.
88 changes: 88 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: ci

on:
pull_request:
branches:
- dev
push:
branches:
- '*'

jobs:

static-code-analysis:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}

steps:
- name: check out repository
uses: actions/checkout@v4

- name: Setup Conda/Mamba
uses: conda-incubator/setup-miniconda@v2
with:
mamba-version: "*"
auto-update-conda: true
activate-environment: scrnasim
environment-file: environment.yml
auto-activate-base: false

- name: Update scrnasim env with dev packages
run: mamba env update -n scrnasim -f environment.dev.yml

- name: display environment info
run: |
conda info -a
conda list
- name: flake8
run: flake8

- name: pylint
run: pylint --rcfile pylint.cfg setup.py scRNAsim_toolz/

- name: mypy
run: mypy scRNAsim_toolz

unit-testing:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}

steps:

- name: checkout repository
uses: actions/checkout@v4

- name: setup Conda/Mamba
uses: conda-incubator/setup-miniconda@v2
with:
mamba-version: "*"
auto-update-conda: true
activate-environment: scrnasim
environment-file: environment.yml
auto-activate-base: false

- name: update scrnasim env with dev packages
run: mamba env update -n scrnasim -f environment.dev.yml

- name: display environment info
run: |
conda info -a
conda list
- name: run unit tests
run: |
coverage run --source scRNAsim_toolz -m pytest
coverage xml
- name: submit coverage report
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
verbose: true
fail_ci_if_error: false

0 comments on commit 4247366

Please sign in to comment.