16
16
timeout-minutes : 10
17
17
needs :
18
18
- unit-tests
19
- - test-slurm
20
19
# Important: the next line MUST be `if: always()`.
21
20
# Do not change that line.
22
21
# That line is necessary to make sure that this job runs even if tests fail.
@@ -25,13 +24,11 @@ jobs:
25
24
steps :
26
25
- run : |
27
26
echo unit-tests: ${{ needs.unit-tests.result }}
28
- echo test-slurm: ${{ needs.test-slurm.result }}
29
27
- run : exit 1
30
28
# The last line must NOT end with ||
31
29
# All other lines MUST end with ||
32
30
if : |
33
- (needs.unit-tests.result != 'success') ||
34
- (needs.test-slurm.result != 'success')
31
+ (needs.unit-tests.result != 'success')
35
32
unit-tests :
36
33
runs-on : ubuntu-latest
37
34
timeout-minutes : 20
51
48
with :
52
49
version : ${{ matrix.version }}
53
50
- uses : julia-actions/julia-runtest@v1
54
- test-slurm :
55
- runs-on : ubuntu-latest
56
- timeout-minutes : 20
57
- strategy :
58
- fail-fast : false
59
- matrix :
60
- version :
61
- # Please note: You must specify the full Julia version number (major.minor.patch).
62
- # This is because the value here will be directly interpolated into a download URL.
63
- # - '1.2.0' # minimum Julia version supported in Project.toml
64
- - ' 1.6.7' # previous LTS
65
- - ' 1.10.7' # current LTS
66
- - ' 1.11.2' # currently the latest stable release
67
- steps :
68
- - uses : actions/checkout@v4
69
- with :
70
- persist-credentials : false
71
- - name : Print Docker version
72
- run : |
73
- docker --version
74
- docker version
75
- # This next bit of code is taken from:
76
- # https://github.com/kleinhenz/SlurmClusterManager.jl
77
- # Original author: Joseph Kleinhenz
78
- # License: MIT
79
- - name : Setup Slurm inside Docker
80
- run : |
81
- docker version
82
- docker compose version
83
- docker build --build-arg "JULIA_VERSION=${MATRIX_JULIA_VERSION:?}" -t slurm-cluster-julia -f ci/Dockerfile .
84
- docker compose -f ci/docker-compose.yml up -d
85
- docker ps
86
- env :
87
- MATRIX_JULIA_VERSION : ${{matrix.version}}
88
- - name : Print some information for debugging purposes
89
- run : |
90
- docker exec -t slurmctld pwd
91
- docker exec -t slurmctld ls -la
92
- docker exec -t slurmctld ls -la ClusterManagers
93
- - name : Instantiate package
94
- run : docker exec -t slurmctld julia --project=ClusterManagers -e 'import Pkg; @show Base.active_project(); Pkg.instantiate(); Pkg.status()'
95
- - name : Run tests without a Slurm allocation
96
- run : docker exec -t slurmctld julia --project=ClusterManagers -e 'import Pkg; Pkg.test(; test_args=["slurm"])'
97
- - name : Run tests inside salloc
98
- run : docker exec -t slurmctld salloc -t 00:10:00 -n 2 julia --project=ClusterManagers -e 'import Pkg; Pkg.test(test_args=["slurm"])'
99
- - name : Run tests inside sbatch
100
- run : docker exec -t slurmctld ClusterManagers/ci/run_my_sbatch.sh
0 commit comments