From 8c1529a7ad33bbf55cd35afb5968e915a24fadea Mon Sep 17 00:00:00 2001 From: Tihomir Krasimirov Mateev Date: Mon, 25 Mar 2024 18:53:24 +0200 Subject: [PATCH] CI/CD quickstart (#2777) * Action to start CI/CD pipeline and minor change to Maven artefact resolving * Set caching up for Maven; use maven-setup-action action, instead of apt-get * Include action for spellcheck * Modigy CodeCov element * New additions to the wordlist file * Polishing, removing new lines that are not necessary * Wrong branch name specified --- .github/spellcheck-settings.yml | 28 ++++++++++++ .github/wordlist.txt | 75 +++++++++++++++++++++++++++++++ .github/workflows/cicd.yaml | 59 ++++++++++++++++++++++++ .github/workflows/spellcheck.yaml | 14 ++++++ pom.xml | 2 +- 5 files changed, 177 insertions(+), 1 deletion(-) create mode 100644 .github/spellcheck-settings.yml create mode 100644 .github/wordlist.txt create mode 100644 .github/workflows/cicd.yaml create mode 100644 .github/workflows/spellcheck.yaml diff --git a/.github/spellcheck-settings.yml b/.github/spellcheck-settings.yml new file mode 100644 index 0000000000..a14e922835 --- /dev/null +++ b/.github/spellcheck-settings.yml @@ -0,0 +1,28 @@ +matrix: + - name: Markdown + expect_match: false + apsell: + lang: en + d: en_US + ignore-case: true + dictionary: + wordlists: + - .github/wordlist.txt + output: wordlist.dic + pipeline: + - pyspelling.filters.markdown: + markdown_extensions: + - markdown.extensions.extra: + - pyspelling.filters.html: + comments: false + attributes: + - alt + ignores: + - ':matches(code, pre)' + - code + - pre + - blockquote + - img + sources: + - '*.md' + - 'docs/**' diff --git a/.github/wordlist.txt b/.github/wordlist.txt new file mode 100644 index 0000000000..7c8f1adf4f --- /dev/null +++ b/.github/wordlist.txt @@ -0,0 +1,75 @@ +!!!Spelling check failed!!! +Observability +CRaC +JVM +https +io +stackoverflow +gitter +im +Javadoc +api +BZMPOP +ZMPOP +FCALL +Lua +redis +SlotHash +instantiation +FailOver +takeOver +ReplicaTopologyProvider +SimpleBatcher +hostname +NodeTopologyView +RedisURI +SslVerifyMode +withSsl +SMISMEMBER +readonly +Eval +lua +zrevrangestorebylex +zrevrangestorebyscore +XTrimArgs +URI +CompositeArgument +arg +md +wg +SSL +RedisLabs +Memorystore +Elasticache +CamelCased +zrangebyscore +zrangebyscoreWithScores +Gradle +http +LettuceDriver +Codecs +JSON +UTF +CDI +Pipelining +netty +scalable +deserialized +enum +SetArgs +param +README +sscanMultiple +ReadFrom +dynamicRefreshSources +pingBeforeActivateConnection +StatefulRedisClusterPubSubConnectionImpl's +NPE +codec +javadoc +NullPointerException +RedisObservation +github +runtime +transactional +Github diff --git a/.github/workflows/cicd.yaml b/.github/workflows/cicd.yaml new file mode 100644 index 0000000000..229a191c4f --- /dev/null +++ b/.github/workflows/cicd.yaml @@ -0,0 +1,59 @@ +name: CI / CD Pipeline +on: + push: + paths-ignore: + - 'docs/**' + - '**/*.md' + - '**/*.rst' + branches: + - main + - '[0-9].*' + pull_request: + branches: + - main + - '[0-9].*' + schedule: + - cron: '0 1 * * *' # nightly build + workflow_dispatch: + +jobs: + + build: + name: Build and Test + runs-on: ubuntu-latest + steps: + - name: Checkout project + uses: actions/checkout@v4 + - name: Set Java up in the runner + uses: actions/setup-java@v2 + with: + java-version: '8' + distribution: 'temurin' + cache: 'maven' + - name: Setup Maven + uses: s4u/setup-maven-action@v1.8.0 + with: + java-version: 8 + - name: Install missing dependencies to container + run: | + sudo apt update + sudo apt install -y stunnel make git gcc + - name: Maven offline + run: | + mvn -q dependency:go-offline + - name: Clean environment + run: | + make cleanup + env: + JVM_OPTS: -Xmx3200m + TERM: dumb + - name: Run tests + run: | + make test-coverage + env: + JVM_OPTS: -Xmx3200m + TERM: dumb + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v4.0.1 + with: + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/spellcheck.yaml b/.github/workflows/spellcheck.yaml new file mode 100644 index 0000000000..943d54098b --- /dev/null +++ b/.github/workflows/spellcheck.yaml @@ -0,0 +1,14 @@ +name: Spellcheck Action +on: + pull_request: +jobs: + check-spelling: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Check Spelling + uses: rojopolis/spellcheck-github-actions@0.36.0 + with: + config_path: .github/spellcheck-settings.yml + task_name: Markdown diff --git a/pom.xml b/pom.xml index b1cb4607b7..40afad6845 100644 --- a/pom.xml +++ b/pom.xml @@ -923,7 +923,7 @@ - linux-aarch64-fedora + linux-aarch_64-fedora