From 6be1a51c866ccd1ef6b409757a715563064fc6b7 Mon Sep 17 00:00:00 2001 From: Felipe Santos Date: Thu, 4 Jul 2024 17:00:38 -0300 Subject: [PATCH] Add Ubuntu 24.04 to the test matrix (#117) * Add Ubuntu 24.04 to the test matrix * Add verdict job to simplify branch protection config --- .github/workflows/ci.yaml | 7 ++++++- scripts/test.sh | 6 +++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index bc81c96..ca1869a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -12,7 +12,7 @@ jobs: fail-fast: false matrix: variant: [devcontainer, wsl, gnome] - os: [ubuntu-20.04, ubuntu-22.04] + os: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04] include: - variant: devcontainer os: alpine @@ -23,3 +23,8 @@ jobs: - uses: actions/checkout@v4 - run: | scripts/test.sh --variant "${{ matrix.variant }}" --os "${{ matrix.os }}" + verdict: + needs: test + runs-on: ubuntu-latest + steps: + - run: echo "All tests passed!" diff --git a/scripts/test.sh b/scripts/test.sh index be79d01..17a575d 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -1,7 +1,7 @@ #!/bin/bash # ARG_OPTIONAL_REPEATED([variant],[v],[The variant of the test to run. Possible values: devcontainer, wsl, and gnome. Default: devcontainer.],[]) -# ARG_OPTIONAL_REPEATED([os],[o],[The OS to run the tests against. The list of possible values can be found at https://mcr.microsoft.com/v2/devcontainers/base/tags/list. Examples: ubuntu-18.04, ubuntu-22.04, and alpine. Default: ubuntu-20.04.],[]) +# ARG_OPTIONAL_REPEATED([os],[o],[The OS to run the tests against. The list of possible values can be found at https://mcr.microsoft.com/v2/devcontainers/base/tags/list. Examples: ubuntu-24.04, alpine. Default: ubuntu-24.04.],[]) # ARG_OPTIONAL_BOOLEAN([debug],[d],[Whether to enable debug logs or not],[off]) # ARG_OPTIONAL_SINGLE([pre-script],[],[The custom script to run before the installation],[]) # ARG_HELP([Tests the installation of the dotfiles in differents scenarios],[]) @@ -35,7 +35,7 @@ print_help() { printf '%s\n' "Tests the installation of the dotfiles in differents scenarios" printf 'Usage: %s [-v|--variant ] [-o|--os ] [-d|--(no-)debug] [--pre-script ] [-h|--help]\n' "$0" printf '\t%s\n' "-v, --variant: The variant of the test to run. Possible values: devcontainer, wsl, and gnome. Default: devcontainer. (empty by default)" - printf '\t%s\n' "-o, --os: The OS to run the tests against. The list of possible values can be found at https://mcr.microsoft.com/v2/devcontainers/base/tags/list. Examples: ubuntu-18.04, ubuntu-22.04, and alpine. Default: ubuntu-20.04. (empty by default)" + printf '\t%s\n' "-o, --os: The OS to run the tests against. The list of possible values can be found at https://mcr.microsoft.com/v2/devcontainers/base/tags/list. Examples: ubuntu-24.04, alpine. Default: ubuntu-24.04. (empty by default)" printf '\t%s\n' "-d, --debug, --no-debug: Whether to enable debug logs or not (off by default)" printf '\t%s\n' "--pre-script: The custom script to run before the installation (no default)" printf '\t%s\n' "-h, --help: Prints help" @@ -160,7 +160,7 @@ if ((${#variants[@]} == 0)); then fi oses=("${_arg_os[@]}") if ((${#oses[@]} == 0)); then - oses=("ubuntu-20.04") + oses=("ubuntu-24.04") fi for variant in "${variants[@]}"; do