Test Installation on mac linux and all Python versions #4
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: Test Installation on mac linux and all Python versions | |
on: | |
workflow_dispatch: | |
jobs: | |
test: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest] #[ubuntu-latest, windows-latest, macos-latest] | |
python-version: ['3.8', '3.9', '3.10', '3.11'] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Set up MSYS2 (Windows only) | |
if: runner.os == 'Windows' | |
uses: msys2/setup-msys2@v2 | |
with: | |
update: true | |
install: base-devel gcc | |
- name: Install dependencies and run setup script | |
shell: bash | |
run: | | |
if [ "$RUNNER_OS" == "Windows" ]; then | |
export PATH="/c/msys64/usr/bin:$PATH" | |
fi | |
python --version | |
which python | |
chmod +x setup.sh | |
./setup.sh | |
- name: Test installation | |
shell: bash | |
run: | | |
if [ "$RUNNER_OS" == "Windows" ]; then | |
source chswEnv/Scripts/activate | |
else | |
source chswEnv/bin/activate | |
fi | |
python get_predictions.py --structure_file example_files/AF-A0A1W2PQ64-F1-model_v4.pdb --output results/test.tsv | |
- name: Run pytest | |
shell: bash | |
run: | | |
if [ "$RUNNER_OS" == "Windows" ]; then | |
export PATH="/c/msys64/usr/bin:$PATH" | |
source chswEnv/Scripts/activate | |
else | |
source chswEnv/bin/activate | |
fi | |
python -c "import sys; print(sys.path)" | |
python -c "import torch; print(torch.__version__)" | |
pwd | |
pytest -v | |
pytest |