1
- # Name of the GitHub Action
2
- name : Build plugin on Pull Request
1
+ name : Build & test plugin
3
2
4
- # Specify when the Action should be triggered: when a pull request is opened against the 'devel' or 'master' branch
5
3
on :
6
4
pull_request :
7
5
branches : [devel, master]
8
6
9
- # Define the job that should be run
10
7
jobs :
11
8
build :
12
- # Specify the machine to run the job on
13
9
runs-on : ubuntu-latest
14
10
15
- # Define the steps to be taken in the job
16
11
steps :
17
- # Freeing up space
18
12
- name : Free Disk Space (Ubuntu only)
19
13
uses : jlumbroso/free-disk-space@main
20
14
21
- # Installing scipion and miniconda dependencies
15
+ - name : Set up MPI
16
+ uses : mpi4py/setup-mpi@master
17
+ with :
18
+ mpi : ' openmpi'
19
+
22
20
- name : Install dependencies
23
21
run : |
24
22
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
+
28
25
- 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"
35
33
36
- # Installing Scipion
37
34
- name : Install Scipion
38
35
working-directory : ${{ github.workspace }}/../
39
36
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
43
39
44
- # Installing scipion-chem
45
40
# Checkout to Pull Request branch if exists, by default stays in devel
46
41
- name : Install scipion-chem (in branch ${{ github.head_ref }} if exists)
47
42
working-directory : ${{ github.workspace }}/../
@@ -55,21 +50,17 @@ jobs:
55
50
fi
56
51
scipion/scipion3 installp -p $REPO_NAME --devel
57
52
58
- # Check out the repository in the pull request
59
53
- name : Checkout repository
60
54
uses : actions/checkout@main
61
55
with :
62
56
ref : ${{ github.head_ref }}
63
57
64
- # Install plugin from the pull request using the Scipion3 installp command
65
58
- name : Install plugin from pull request
66
59
working-directory : ${{ github.workspace }}
67
60
run : ../scipion/scipion3 installp -p . --devel
68
61
69
- # Run all tests
70
62
- name : Run tests
71
63
working-directory : ${{ github.workspace }}/${{ vars.FOLDER_WITH_VERSION }}
72
64
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