Fix splitting bug #319
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/github-script@0.9.0 | |
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 |