-
Notifications
You must be signed in to change notification settings - Fork 1
77 lines (72 loc) · 2.12 KB
/
test.yml
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
---
name: ShellCheck and Test
on:
push:
paths:
- 'denv'
- '_denv_entrypoint'
- 'install'
- 'uninstall'
- 'ci/test'
- 'ci/check'
workflow_dispatch:
pull_request:
jobs:
shellcheck:
name: Shellcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run ShellCheck
run: ./ci/check
list-runners-to-test:
name: List Runners to Test
runs-on: ubuntu-latest
outputs:
runners: ${{steps.read_json.outputs.runners}}
steps:
- uses: actions/checkout@v4
- id: read_json
run: echo "runners=$(jq -c . ci/runners-to-test.json)" >> $GITHUB_OUTPUT
test:
name: Test
needs: list-runners-to-test
strategy:
fail-fast: false
matrix: ${{fromJSON(needs.list-runners-to-test.outputs.runners)}}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: install singularity
if: ${{matrix.runner == 'singularity' || matrix.runner == 'apptainer' || matrix.runner == 'sylabs'}}
run: ./ci/install-singularity-flavor ${{matrix.runner}} ${{matrix.version}}
- name: enable debug mode if requested
if: ${{runner.debug == '1'}}
run: echo "DENV_DEBUG=1" >> "$GITHUB_ENV"
- name: Install
run: sudo ./install
- name: deduce runner name
run: |
installed_runner=${{ matrix.runner }}
if [ "${installed_runner}" = "sylabs" ]; then
echo "DENV_RUNNER=singularity" >> "$GITHUB_ENV"
else
echo "DENV_RUNNER=${installed_runner}" >> "$GITHUB_ENV"
fi
- name: Test
run: ./ci/test
# test-macos:
# name: Test on MacOS
# runs-on: macos-latest
# steps:
# - uses: douglascamata/setup-docker-macos-action@v1-alpha
# - uses: actions/checkout@v4
# - name: enable debug mode if requested
# if: ${{runner.debug == '1'}}
# run: echo "DENV_DEBUG=1" >> "$GITHUB_ENV"
# - name: Install
# run: sudo ./install
# - name: deduce runner name
# run: echo "DENV_RUNNER=docker" >> "$GITHUB_ENV"
# - name: Test
# run: ./ci/test