Skip to content

Commit 1b7ee9b

Browse files
authored
Update test source
1 parent f0e5d87 commit 1b7ee9b

File tree

1 file changed

+19
-28
lines changed

1 file changed

+19
-28
lines changed
Lines changed: 19 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,42 @@
1-
# Name of the GitHub Action
2-
name: Build plugin on Pull Request
1+
name: Build & test plugin
32

4-
# Specify when the Action should be triggered: when a pull request is opened against the 'devel' or 'master' branch
53
on:
64
pull_request:
75
branches: [devel, master]
86

9-
# Define the job that should be run
107
jobs:
118
build:
12-
# Specify the machine to run the job on
139
runs-on: ubuntu-latest
1410

15-
# Define the steps to be taken in the job
1611
steps:
17-
# Freeing up space
1812
- name: Free Disk Space (Ubuntu only)
1913
uses: jlumbroso/free-disk-space@main
2014

21-
# Installing scipion and miniconda dependencies
15+
- name: Set up MPI
16+
uses: mpi4py/setup-mpi@master
17+
with:
18+
mpi: 'openmpi'
19+
2220
- name: Install dependencies
2321
run: |
2422
sudo apt-get update
25-
sudo apt-get install -y wget gcc g++ libopenmpi-dev make
26-
27-
# Installing Miniconda
23+
sudo apt-get install -y wget gcc g++ make
24+
2825
- name: Install Miniconda
29-
working-directory: ${{ github.workspace }}/../
30-
run: |
31-
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
32-
bash Miniconda3-latest-Linux-x86_64.sh -b -p miniconda/
33-
source miniconda/etc/profile.d/conda.sh
34-
conda update -n base -c defaults conda -y
26+
uses: conda-incubator/setup-miniconda@main
27+
with:
28+
miniconda-version: "latest"
29+
auto-update-conda: true
30+
auto-activate-base: true
31+
activate-environment: scipion3
32+
python-version: "3.8"
3533

36-
# Installing Scipion
3734
- name: Install Scipion
3835
working-directory: ${{ github.workspace }}/../
3936
run: |
40-
eval "$(miniconda/bin/conda shell.bash hook)"
41-
pip3 install --user scipion-installer
42-
python3 -m scipioninstaller -conda -noXmipp -noAsk scipion
37+
pip install --user scipion-installer
38+
python -m scipioninstaller -conda -noXmipp -noAsk scipion
4339
44-
# Installing scipion-chem
4540
# Checkout to Pull Request branch if exists, by default stays in devel
4641
- name: Install scipion-chem (in branch ${{ github.head_ref }} if exists)
4742
working-directory: ${{ github.workspace }}/../
@@ -55,21 +50,17 @@ jobs:
5550
fi
5651
scipion/scipion3 installp -p $REPO_NAME --devel
5752
58-
# Check out the repository in the pull request
5953
- name: Checkout repository
6054
uses: actions/checkout@main
6155
with:
6256
ref: ${{ github.head_ref }}
6357

64-
# Install plugin from the pull request using the Scipion3 installp command
6558
- name: Install plugin from pull request
6659
working-directory: ${{ github.workspace }}
6760
run: ../scipion/scipion3 installp -p . --devel
6861

69-
# Run all tests
7062
- name: Run tests
7163
working-directory: ${{ github.workspace }}/${{ vars.FOLDER_WITH_VERSION }}
7264
run: |
73-
eval "$(${{ github.workspace }}/../miniconda/bin/conda shell.bash hook)"
74-
conda activate scipion3
75-
python runTests.py ${{ github.workspace }}/../scipion/scipion3 ${{ vars.FOLDER_WITH_VERSION }} -noGPU -testData=testData.json
65+
pip install --user scipion-testrunner
66+
scipion-testrunner ${{ github.workspace }}/../scipion/scipion3 ${{ vars.FOLDER_WITH_VERSION }} --noGpu --testData=testData.json

0 commit comments

Comments
 (0)