Skip to content

Commit

Permalink
Update functional CI
Browse files Browse the repository at this point in the history
  • Loading branch information
David-Araripe committed Jan 8, 2024
1 parent 894d178 commit 0d4c498
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 17 deletions.
25 changes: 19 additions & 6 deletions .github/workflows/dev_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,22 @@ jobs:
- 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
echo "$HOME_DIR" >> $GITHUB_PATH
- name: Print Clustal Omega & MAFFT versions
run: |
Expand All @@ -49,21 +55,28 @@ jobs:
- name: Install dependencies
run: |
python --version
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 # -x: stop on first failure, -v: verbose
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 && cd "$HOME_DIR"
run: cd testing/test_cli && ./run.sh

- name: Test Tutorials
run: cd testing/test_tutorial && ./run.sh && cd "$HOME_DIR"
run: cd testing/test_tutorial && ./run.sh

- name: Test Consistency
run: cd testing/test_consistency && ./run.sh && cd "$HOME_DIR"
run: cd testing/test_consistency && ./run.sh
35 changes: 24 additions & 11 deletions .github/workflows/pre_merge_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,33 +31,46 @@ jobs:
restore-keys: |
${{ runner.os }}-pip-
- name: Install Clustal Omega and MAFFT
- name: Install Clustal Omega, MAFFT & add to PATH
run: |
export HOME_DIR=$PWD
echo "HOME_DIR=$PWD" >> $GITHUB_ENV # used later in the workflow
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
export MAFFT_BINARIES=$HOME_DIR/mafft-linux64/mafftdir/libexec/
echo $HOME_DIR >> $GITHUB_PATH
clustalo --version # For debugging clustalo version
mafft --version # For debugging mafft version
echo "$HOME_DIR" >> $GITHUB_PATH # make clustalo available in the next steps
- name: Print Clustal Omega & MAFFT versions
run: |
clustalo --version # For debugging clustalo version
mafft --version # For debugging mafft version
- name: Install dependencies
run: |
python --version
python -m pip install ".[full]"
python -c "print('Python version: ' + '$(python --version)')"
python -c "import platform; print('System info: ', platform.system(), platform.release())" # For debugging OS version
python -c "import platform; print(platform.system(), platform.release())" # For debugging OS version
python -m pip install ".[full]"
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 # -x: stop on first failure, -v: verbose
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 && cd "$HOME_DIR"
run: cd testing/test_cli && ./run.sh

- name: Test Tutorials
run: cd testing/test_tutorial && ./run.sh && cd "$HOME_DIR"
run: cd testing/test_tutorial && ./run.sh

- name: Test Consistency
run: cd testing/test_consistency && ./run.sh && cd "$HOME_DIR"
run: cd testing/test_consistency && ./run.sh

0 comments on commit 0d4c498

Please sign in to comment.