Skip to content

Commit

Permalink
add CI
Browse files Browse the repository at this point in the history
  • Loading branch information
AmandaBirmingham committed May 24, 2024
1 parent 986c591 commit 0ab56ea
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 1 deletion.
44 changes: 44 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Continuous integration unit testing and lint

on: [push]

jobs:
build:
strategy:
matrix:
python-version: ['3.8', '3.10']
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -el {0}

steps:
- name: Check out repository
uses: actions/checkout@v3

- name: Set up Conda
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true

- name: Install conda environment
run: |
conda env create -n qiimp2 -f qiimp-environment.yml
- name: Test with pytest
run: |
conda activate qiimp2
conda install pytest
which python
pip install -e . --no-deps
pytest
- name: Lint with flake8
run: |
conda activate qiimp2
conda install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
13 changes: 13 additions & 0 deletions qiimp_environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: qiimp2
channels:
- defaults
dependencies:
- python
- flake8
- nose
- pandas
- pep8
- pip
- pyyaml
- pip:
- cerberus
1 change: 0 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ versionfile_source = qiimp/_version.py
versionfile_build = qiimp/_version.py
tag_prefix =
parentdir_prefix = qiimp-

0 comments on commit 0ab56ea

Please sign in to comment.