Skip to content

Commit

Permalink
add github workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
David-Araripe committed Jan 5, 2024
1 parent a51bbef commit 8116e0c
Show file tree
Hide file tree
Showing 3 changed files with 113 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/dev_ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Multi-OS Python Version Test

on:
push:
branches:
- dev
pull_request:
branches:
- dev

jobs:
build-and-test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python-version: [3.10, 3.11, 3.12]
defaults:
run:
shell: bash

steps:
- uses: actions/checkout@v2

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

- name: Install External Software
run: |
wget http://www.clustal.org/omega/clustalo-1.2.4-Ubuntu-x86_64 -O clustalo && chmod +x clustalo
wget https://mafft.cbrc.jp/alignment/software/mafft-7.520-linux.tgz -O mafft.tgz && tar -xzvf mafft.tgz && chmod +x mafft-linux64/mafftdir/bin/mafft
export PATH=$PATH:$PWD/mafft-linux64/mafftdir/bin/:$PWD
export MAFFT_BINARIES=$PWD/mafft-linux64/mafftdir/libexec/
clustalo --version # For debugging clustalo version
mafft --version # For debugging mafft version
- name: Install dependencies
run: |
python --version
python -m pip install ".[full]"
python -c "import qsprpred; print(qsprpred.__version__)" # For debugging package version
python -m pip install pytest
python -m pip install jupyterlab
python -m pip freeze # For debugging environment
- name: Run tests
run: pytest qsprpred

- name: Run notebooks
run: |
cd clitest && ./run.sh
cd ../tutorial && ./run_all.sh
58 changes: 58 additions & 0 deletions .github/workflows/pre_merge_ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: pre-merge Python3.10 CI

on:
push:
branches:
- feature/** # these branches as well
- enhancement/**
- fix/**

jobs:
ubuntu_python_3_10:
runs-on: ubuntu-latest
timeout-minutes: 120
defaults:
run:
shell: bash

steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10'

- name: Cache Python dependencies
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install External Software
run: |
wget http://www.clustal.org/omega/clustalo-1.2.4-Ubuntu-x86_64 -O clustalo && chmod +x clustalo
wget https://mafft.cbrc.jp/alignment/software/mafft-7.520-linux.tgz -O mafft.tgz && tar -xzvf mafft.tgz && chmod +x mafft-linux64/mafftdir/bin/mafft
export PATH=$PATH:$PWD/mafft-linux64/mafftdir/bin/:$PWD
export MAFFT_BINARIES=$PWD/mafft-linux64/mafftdir/libexec/
clustalo --version # For debugging clustalo version
mafft --version # For debugging mafft version
- name: Install dependencies
run: |
python --version
python -m pip install ".[full]"
python -c "import qsprpred; print(qsprpred.__version__)" # For debugging package version
python -m pip install pytest
python -m pip install jupyterlab
python -m pip freeze # For debugging environment
- name: Run tests
run: pytest qsprpred

- name: Run notebooks
run: |
cd clitest && ./run.sh
cd ../tutorial && ./run_all.sh
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
### QSPRpred Specific
/.*
!.github
!.gitignore
!.gitlab-ci.yml
!.pre-commit-config.yaml
Expand Down

0 comments on commit 8116e0c

Please sign in to comment.