Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 20 additions & 20 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ name: CI

on:
push:
branches:
- "master"
pull_request:
branches:
- "master"
Expand All @@ -21,6 +19,9 @@ jobs:
matrix:
os: [macOS-latest, ubuntu-latest]
python-version: [3.7, 3.8]
defaults:
run:
shell: bash -el {0}
env:
CI_OS: ${{ matrix.os }}
PYVER: ${{ matrix.python-version }}
Expand All @@ -30,38 +31,35 @@ jobs:
- uses: actions/checkout@v3

- name: Additional info about the build
shell: bash
run: |
uname -a
df -h
ulimit -a

- uses: conda-incubator/setup-miniconda@v2
- name: Miniconda Setup
uses: conda-incubator/setup-miniconda@v3
with:
python-version: ${{ matrix.python-version }}
miniforge-variant: Mambaforge
miniforge-version: latest
activate-environment: test
environment-file: devtools/conda-envs/test_env.yaml
auto-update-conda: true
conda-build-version: '>=25.1'
channels: conda-forge,defaults,bioconda
environment-file: devtools/conda-envs/test_env.yaml
python-version: ${{ matrix.python-version }}
activate-environment: test

# TODO: Remove this step when patched theseus makes it to CF
- name: Build patched mmligner
shell: bash -l {0}
run: |
conda activate base
conda install conda-build
conda build devtools/conda-recipes/mmligner/

- name: Install package
shell: bash -l {0}
run: |
conda install -c local mmligner pip
python -m pip install . --no-deps
conda list

- name: Run tests
shell: bash -l {0}
run: |
pytest -v --cov=${PACKAGE} --cov-report=xml --color=yes ${PACKAGE}/tests/

Expand All @@ -76,6 +74,9 @@ jobs:
#############
lint-format:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -el {0}
env:
CI_OS: ubuntu-latest
PACKAGE: "opencadd"
Expand All @@ -85,27 +86,26 @@ jobs:
- name: Checkout the code
uses: actions/checkout@v3

- uses: conda-incubator/setup-miniconda@v2
- name: Miniconda Setup
uses: conda-incubator/setup-miniconda@v3
with:
python-version: "3.8"
miniforge-variant: Mambaforge
miniforge-version: latest
activate-environment: test
environment-file: devtools/conda-envs/test_env.yaml
auto-update-conda: true
conda-build-version: '>=25.1'
channels: conda-forge,defaults,bioconda
environment-file: devtools/conda-envs/test_env.yaml
python-version: 3.8
activate-environment: test

- name: Install linter and formatter
shell: bash -l {0}
run: |
conda install -y pylint black

- name: Run pylint
shell: bash -l {0}
run: |
pylint $PACKAGE/

- name: Run black check
shell: bash -l {0}
if: always()
run: |
black --check -l 99 $PACKAGE/
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,10 @@ ENV/
.mypy_cache/

# VSCode
.vscode/
.vscode/

# PyCharm
.idea/

# MacOS
.DS_Store