Auto Runner Version Update (#148) #402
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: ShellCheck and Test | |
on: | |
push: | |
paths: | |
- 'denv' | |
- '_denv_entrypoint' | |
- 'install' | |
- 'uninstall' | |
- 'ci/test' | |
- 'ci/check' | |
- 'ci/runners-to-test.json' | |
- 'test/**' | |
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 | |
with: | |
submodules: 'recursive' | |
- name: install singularity | |
if: ${{matrix.runner == 'singularity' || matrix.runner == 'apptainer' || matrix.runner == 'sylabs'}} | |
run: ./ci/install-singularity-flavor ${{matrix.runner}} ${{matrix.version}} | |
- name: run tests | |
run: | | |
installed_runner=${{ matrix.runner }} | |
if [ "${installed_runner}" = "sylabs" ]; then | |
./ci/test singularity | |
else | |
./ci/test "${installed_runner}" | |
fi | |
# test-macos: | |
# name: Test on MacOS | |
# runs-on: macos-latest | |
# steps: | |
# - uses: douglascamata/setup-docker-macos-action@v1-alpha | |
# - uses: actions/checkout@v4 | |
# with: | |
# submodules: 'recursive' | |
# - name: Test | |
# run: ./ci/test docker |