1616 timeout-minutes : 10
1717 needs :
1818 - unit-tests
19- - test-slurm
2019 # Important: the next line MUST be `if: always()`.
2120 # Do not change that line.
2221 # That line is necessary to make sure that this job runs even if tests fail.
@@ -25,13 +24,11 @@ jobs:
2524 steps :
2625 - run : |
2726 echo unit-tests: ${{ needs.unit-tests.result }}
28- echo test-slurm: ${{ needs.test-slurm.result }}
2927 - run : exit 1
3028 # The last line must NOT end with ||
3129 # All other lines MUST end with ||
3230 if : |
33- (needs.unit-tests.result != 'success') ||
34- (needs.test-slurm.result != 'success')
31+ (needs.unit-tests.result != 'success')
3532 unit-tests :
3633 runs-on : ubuntu-latest
3734 timeout-minutes : 20
6259 # If this PR is NOT from a fork, then DO fail CI if the Codecov upload errors.
6360 # If this is not a PR, then DO fail CI if the Codecov upload errors.
6461 fail_ci_if_error : ${{ github.event_name != 'pull_request' || github.repository == github.event.pull_request.head.repo.full_name }}
65- test-slurm :
66- runs-on : ubuntu-latest
67- timeout-minutes : 20
68- strategy :
69- fail-fast : false
70- matrix :
71- version :
72- # Please note: You must specify the full Julia version number (major.minor.patch).
73- # This is because the value here will be directly interpolated into a download URL.
74- # - '1.2.0' # minimum Julia version supported in Project.toml
75- - ' 1.6.7' # previous LTS
76- - ' 1.10.7' # current LTS
77- - ' 1.11.2' # currently the latest stable release
78- steps :
79- - uses : actions/checkout@v4
80- with :
81- persist-credentials : false
82- - name : Print Docker version
83- run : |
84- docker --version
85- docker version
86- # This next bit of code is taken from:
87- # https://github.com/kleinhenz/SlurmClusterManager.jl
88- # Original author: Joseph Kleinhenz
89- # License: MIT
90- - name : Setup Slurm inside Docker
91- run : |
92- docker version
93- docker compose version
94- docker build --build-arg "JULIA_VERSION=${MATRIX_JULIA_VERSION:?}" -t slurm-cluster-julia -f ci/Dockerfile .
95- docker compose -f ci/docker-compose.yml up -d
96- docker ps
97- env :
98- MATRIX_JULIA_VERSION : ${{matrix.version}}
99- - name : Print some information for debugging purposes
100- run : |
101- docker exec -t slurmctld pwd
102- docker exec -t slurmctld ls -la
103- docker exec -t slurmctld ls -la ClusterManagers
104- - name : Instantiate package
105- run : docker exec -t slurmctld julia --project=ClusterManagers -e 'import Pkg; @show Base.active_project(); Pkg.instantiate(); Pkg.status()'
106- - name : Run tests without a Slurm allocation
107- run : docker exec -t slurmctld julia --project=ClusterManagers -e 'import Pkg; Pkg.test(; test_args=["slurm"])'
108- - name : Run tests inside salloc
109- run : docker exec -t slurmctld salloc -t 00:10:00 -n 2 julia --project=ClusterManagers -e 'import Pkg; Pkg.test(; test_args=["slurm"], coverage=true)'
110- - name : Run tests inside sbatch
111- run : docker exec -t slurmctld ClusterManagers/ci/run_my_sbatch.sh
112- - run : find . -type f -name '*.cov'
113- - name : Copy .cov files out of the Docker container
114- run : docker exec slurmctld /bin/bash -c 'cd /home/docker/ClusterManagers && tar -cf - src/*.cov' | tar -xvf -
115- - run : find . -type f -name '*.cov'
116- # - run: find . -type f -name '*.cov' -exec cat {} \;
117- - uses : julia-actions/julia-processcoverage@v1
118- - uses : codecov/codecov-action@v5
119- with :
120- files : lcov.info
121- token : ${{ secrets.CODECOV_TOKEN }}
122- # If this PR is from a fork, then do NOT fail CI if the Codecov upload errors.
123- # If this PR is NOT from a fork, then DO fail CI if the Codecov upload errors.
124- # If this is not a PR, then DO fail CI if the Codecov upload errors.
125- fail_ci_if_error : ${{ github.event_name != 'pull_request' || github.repository == github.event.pull_request.head.repo.full_name }}
0 commit comments