Merge pull request #6 from CDDLeiden/enhancement/merge_contrib #25
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: 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'] | |
fail-fast: false | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Clustal Omega, MAFFT & add to PATH | |
run: | | |
export HOME_DIR=$PWD | |
echo "HOME_DIR=$PWD" >> $GITHUB_ENV # used later in the workflow | |
if [ "${{ runner.os }}" = "macOS" ]; then | |
wget http://www.clustal.org/omega/clustal-omega-1.2.3-macosx -O clustalo && chmod +x clustalo | |
brew install mafft && unset MAFFT_BINARIES | |
echo "$HOME_DIR" >> $GITHUB_PATH # make clustalo available in the next steps | |
elif [ "${{ runner.os }}" = "Linux" ]; then | |
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 | |
echo "MAFFT_BINARIES=$PWD/mafft-linux64/mafftdir/libexec/" >> $GITHUB_ENV | |
echo "$HOME_DIR/mafft-linux64/mafftdir/bin/" >> $GITHUB_PATH | |
echo "$HOME_DIR" >> $GITHUB_PATH # make clustalo available in the next steps | |
elif [ "${{ runner.os }}" = "Windows" ]; then | |
choco install clustal-omega mafft | |
echo "::add-path::$env:ProgramFiles\Clustal Omega" | |
echo "::add-path::$env:ProgramFiles\MAFFT" | |
fi | |
- name: Print Clustal Omega & MAFFT versions | |
run: | | |
clustalo --version # For debugging clustalo version | |
mafft --version # For debugging mafft version | |
- name: Install dependencies | |
run: | | |
python -c "print('Python version: ' + '$(python --version)')" | |
python -c "import platform; print('System info: ', platform.system(), platform.release())" # For debugging OS version | |
python -m pip install ".[full]" --no-cache-dir | |
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 pytest | |
run: pytest -xv qsprpred --junitxml=$HOME_DIR/test_report.xml # -x: stop on first failure, -v: verbose | |
- name: Publish Test Report | |
uses: mikepenz/action-junit-report@v4 | |
if: success() || failure() # always run even if the previous step fails | |
with: | |
report_paths: 'test_report.xml' | |
- name: Test CLI | |
run: cd testing/test_cli && ./run.sh | |
- name: Test Tutorials | |
run: cd testing/test_tutorial && ./run.sh | |
- name: Test Consistency | |
run: cd testing/test_consistency && ./run.sh |