Skip to content

Add filtering nanobodies #337

Add filtering nanobodies

Add filtering nanobodies #337

name: Run pytest
on:
pull_request:
branches: [ main, dev ]
env:
MY_REF: ${{ format('refs/heads/{0}', github.event.pull_request.head.ref) }}
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
PYTHONIOENCODING: utf-8
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
version: ["3.8", "3.10"]
os: [ubuntu-latest, macos-latest]
steps:
- name: Check if relevant files have changed
uses: actions/[email protected]
id: service-changed
with:
result-encoding: string
script: |
const result = await github.pulls.listFiles({
owner: context.payload.repository.owner.login,
repo: context.payload.repository.name,
pull_number: context.payload.number,
per_page: 100
})
const serviceChanged = result.data.filter(f => f.filename.startsWith("proteinflow/")).length > 0
console.log(serviceChanged)
return serviceChanged
- uses: actions/checkout@v3
if: ${{ steps.service-changed.outputs.result == 'true' }}
with:
ref: ${{ env.MY_REF }}
fetch-depth: 0
- name: Install dependencies
if: ${{ steps.service-changed.outputs.result == 'true' }}
run: |
conda update conda -y
conda create --name proteinflow -y python=${{ matrix.version }}
conda install -n proteinflow -c conda-forge -c bioconda mmseqs2
conda run -n proteinflow python -m pip install torch --extra-index-url https://download.pytorch.org/whl/cpu
conda run -n proteinflow python -m pip install awscli pytest flake8
conda run -n proteinflow python -m pip install numpy
conda run -n proteinflow python -m pip install "rcsbsearch @ git+https://github.com/sbliven/rcsbsearch@dbdfe3880cc88b0ce57163987db613d579400c8e"
conda run -n proteinflow python -m pip install -e .
- name: Test with pytest
if: ${{ steps.service-changed.outputs.result == 'true' }}
run: |
conda run -n proteinflow pytest tests