-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (81 loc) · 2.86 KB
/
ci-tests.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: "CI Tests"
on:
push:
branches:
- master
pull_request:
branches:
- master
concurrency:
group: build-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
slurm:
name: "Slurm Docker images tests"
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- name: "Get current date"
run: echo "NOW=$(date +'%Y-%m-%dT%H:%M:%S')" >> $GITHUB_ENV
- name: "Build slurmctld image"
uses: docker/build-push-action@v5
with:
build-args: |
COMMIT=${{ github.sha }}
CREATION_DATE=${{ env.NOW }}
context: slurm/slurmctld
load: true
tags: alphaunito/slurmctld:23.11.4
- name: "Build slurmd image"
uses: docker/build-push-action@v5
with:
build-args: |
COMMIT=${{ github.sha }}
CREATION_DATE=${{ env.NOW }}
context: slurm/slurmd
load: true
tags: alphaunito/slurmd:23.11.4
- name: "Start Docker Compose"
id: start-compose
run: |
docker compose \
--file slurm/docker-compose.yml \
--project-name slurm \
up \
--wait \
--wait-timeout 60 \
- name: "Run test with Docker Compose"
id: run-tests
run: |
docker compose \
--file slurm/docker-compose.yml \
--project-name slurm \
exec \
--user hpcuser \
slurmctld srun --deadline 00:01:00 hostname
- name: "Show slurmctld logs on failure"
if: ${{ always() && (steps.start-compose.outcome == 'failure' || steps.run-tests.outcome == 'failure') }}
run: |
docker compose \
--file slurm/docker-compose.yml \
--project-name slurm \
logs \
slurmctld
- name: "Show slurmd logs on failure"
if: ${{ always() && (steps.start-compose.outcome == 'failure' || steps.run-tests.outcome == 'failure') }}
run: |
docker compose \
--file slurm/docker-compose.yml \
--project-name slurm \
logs \
slurmd
- name: "Stop Docker Compose"
if: ${{ always() }}
run: |
docker compose \
--file slurm/docker-compose.yml \
--project-name slurm \
down \
--volumes