|
66 | 66 | # If this PR is NOT from a fork, then DO fail CI if the Codecov upload errors. |
67 | 67 | # If this is not a PR, then DO fail CI if the Codecov upload errors. |
68 | 68 | fail_ci_if_error: ${{ github.event_name != 'pull_request' || github.repository == github.event.pull_request.head.repo.full_name }} |
69 | | - test-slurm: |
70 | | - if: false |
71 | | - runs-on: ubuntu-latest |
72 | | - timeout-minutes: 20 |
73 | | - strategy: |
74 | | - fail-fast: false |
75 | | - matrix: |
76 | | - version: |
77 | | - # Please note: You must specify the full Julia version number (major.minor.patch). |
78 | | - # This is because the value here will be directly interpolated into a download URL. |
79 | | - # - '1.2.0' # minimum Julia version supported in Project.toml |
80 | | - - '1.6.7' # previous LTS |
81 | | - - '1.10.7' # current LTS |
82 | | - - '1.11.2' # currently the latest stable release |
83 | | - steps: |
84 | | - - uses: actions/checkout@v4 |
85 | | - with: |
86 | | - persist-credentials: false |
87 | | - - name: Print Docker version |
88 | | - run: | |
89 | | - docker --version |
90 | | - docker version |
91 | | - # This next bit of code is taken from: |
92 | | - # https://github.com/kleinhenz/SlurmClusterManager.jl |
93 | | - # Original author: Joseph Kleinhenz |
94 | | - # License: MIT |
95 | | - - name: Setup Slurm inside Docker |
96 | | - run: | |
97 | | - docker version |
98 | | - docker compose version |
99 | | - docker build --build-arg "JULIA_VERSION=${MATRIX_JULIA_VERSION:?}" -t slurm-cluster-julia -f ci/Dockerfile . |
100 | | - docker compose -f ci/docker-compose.yml up -d |
101 | | - docker ps |
102 | | - env: |
103 | | - MATRIX_JULIA_VERSION: ${{matrix.version}} |
104 | | - - name: Print some information for debugging purposes |
105 | | - run: | |
106 | | - docker exec -t slurmctld pwd |
107 | | - docker exec -t slurmctld ls -la |
108 | | - docker exec -t slurmctld ls -la HTCondorClusterManager |
109 | | - - name: Instantiate package |
110 | | - run: docker exec -t slurmctld julia --project=HTCondorClusterManager -e 'import Pkg; @show Base.active_project(); Pkg.instantiate(); Pkg.status()' |
111 | | - - name: Run tests without a Slurm allocation |
112 | | - run: docker exec -t slurmctld julia --project=HTCondorClusterManager -e 'import Pkg; Pkg.test(; test_args=["slurm"])' |
113 | | - - name: Run tests inside salloc |
114 | | - run: docker exec -t slurmctld salloc -t 00:10:00 -n 2 julia --project=HTCondorClusterManager -e 'import Pkg; Pkg.test(; test_args=["slurm"], coverage=true)' |
115 | | - - name: Run tests inside sbatch |
116 | | - run: docker exec -t slurmctld HTCondorClusterManager/ci/run_my_sbatch.sh |
117 | | - - run: find . -type f -name '*.cov' |
118 | | - - name: Copy .cov files out of the Docker container |
119 | | - run: docker exec slurmctld /bin/bash -c 'cd /home/docker/HTCondorClusterManager && tar -cf - src/*.cov' | tar -xvf - |
120 | | - - run: find . -type f -name '*.cov' |
121 | | - # - run: find . -type f -name '*.cov' -exec cat {} \; |
122 | | - - uses: julia-actions/julia-processcoverage@v1 |
123 | | - - uses: codecov/codecov-action@v5 |
124 | | - with: |
125 | | - files: lcov.info |
126 | | - token: ${{ secrets.CODECOV_TOKEN }} |
127 | | - # If this PR is from a fork, then do NOT fail CI if the Codecov upload errors. |
128 | | - # If this PR is NOT from a fork, then DO fail CI if the Codecov upload errors. |
129 | | - # If this is not a PR, then DO fail CI if the Codecov upload errors. |
130 | | - fail_ci_if_error: ${{ github.event_name != 'pull_request' || github.repository == github.event.pull_request.head.repo.full_name }} |
131 | 69 | example-pull-gcr: |
132 | 70 | runs-on: ubuntu-latest |
133 | 71 | timeout-minutes: 20 |
|
0 commit comments