From 062001867c3d71f1a438db49ee68ab9de6d38ae9 Mon Sep 17 00:00:00 2001 From: David Rabkin Date: Thu, 8 Feb 2024 12:54:10 +0200 Subject: [PATCH] Generalize the GitHub Continuous Integration process --- .../config/vocabularies/Base/accept.txt | 3 +- .github/workflows/test.yml | 30 +++++++++++-------- lint.do | 4 +-- 3 files changed, 21 insertions(+), 16 deletions(-) diff --git a/.github/styles/config/vocabularies/Base/accept.txt b/.github/styles/config/vocabularies/Base/accept.txt index 191cc54..4ecd017 100644 --- a/.github/styles/config/vocabularies/Base/accept.txt +++ b/.github/styles/config/vocabularies/Base/accept.txt @@ -1,6 +1,5 @@ Gento Matveev -openshift -OpenShift +[Oo]pen[Ss]hift Rabkin Sergey diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2d48397..7526941 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,9 +1,15 @@ --- name: test 'on': push +env: + BASE_REL: 0.9.20240202 + BASE_SRC: https://github.com/rdavid/shellbase/archive/refs/tags/v0.9.20240202.tar.gz # yamllint disable-line jobs: test-linux: - runs-on: ubuntu-latest + strategy: + matrix: + os: [ubuntu-20.04, ubuntu-22.04] + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - uses: hadolint/hadolint-action@v3.1.0 @@ -25,19 +31,13 @@ jobs: file_or_dir: .github/*.yml .github/workflows/*.yml cfg/*.yml strict: true test-macos: - runs-on: macos-latest - env: - BASE_SRC: https://github.com/rdavid/shellbase/archive/refs/tags/v0.9.20230808.tar.gz # yamllint disable-line + strategy: + matrix: + os: [macos-12, macos-14] + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - run: | - curl --location --silent $BASE_SRC | - tar \ - --directory /usr/local/bin \ - --extract \ - --gzip \ - --strip-components=2 \ - shellbase-0.9.20230808/lib/base.sh brew install \ asciidoctor \ goredo \ @@ -46,5 +46,11 @@ jobs: typos-cli \ vale \ yamllint - vale sync + curl --location --silent $BASE_SRC | + tar \ + --directory /usr/local/bin \ + --extract \ + --gzip \ + --strip-components=2 \ + shellbase-$BASE_REL/lib/base.sh redo -xx diff --git a/lint.do b/lint.do index 597951f..3c74186 100644 --- a/lint.do +++ b/lint.do @@ -10,7 +10,7 @@ redo-ifchange \ # shellcheck disable=SC2034 # Variable appears unused. readonly \ - BASE_APP_VERSION=0.9.20240107 \ + BASE_APP_VERSION=0.9.20240208 \ BASE_MIN_VERSION=0.9.20231212 \ BSH=/usr/local/bin/base.sh [ -r "$BSH" ] || { @@ -25,7 +25,7 @@ cmd_exists shellcheck && shellcheck ./*.do app/* cmd_exists shfmt && shfmt -d ./*.do app/* cmd_exists typos && typos cmd_exists vale && { - vale sync >/dev/null 2>&1 || : + vale sync vale README.adoc } cmd_exists yamllint && yamllint .github/*.yml .github/workflows/*.yml