Skip to content

Commit

Permalink
Periodically test against IMP stable release
Browse files Browse the repository at this point in the history
  • Loading branch information
benmwebb committed Feb 10, 2022
1 parent f4f1ed0 commit 39f78d7
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: build

on:
push:
pull_request:
schedule:
- cron: "57 12 * * 3" # Run at a random time weekly

jobs:
build:

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["3.10"]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Setup conda and dependencies
run: |
util/setup_ci.sh ${{ matrix.python-version }}
- name: Test
run: |
eval "$(conda shell.bash hook)"
conda activate python${{ matrix.python-version }}
cd test
# Run a quick subset of all tests
python test.py Tests.test_mmcif
20 changes: 20 additions & 0 deletions util/setup_ci.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash -e

# Set up an environment to run tests under Travis CI (see toplevel .travis.yml)
# or GitHub Actions (see toplevel .github/workflows/build.yml)

if [ $# -ne 1 ]; then
echo "Usage: $0 python_version"
exit 1
fi

python_version=$1

# get conda-forge, not main, packages
conda config --remove channels defaults
conda config --add channels conda-forge
IMP_CONDA="imp"

conda create --yes -q -n python${python_version} -c salilab python=${python_version} matplotlib ${IMP_CONDA}
eval "$(conda shell.bash hook)"
conda activate python${python_version}

0 comments on commit 39f78d7

Please sign in to comment.