From db4035e41fa7b815601a68d25c11fbb7eb6d850e Mon Sep 17 00:00:00 2001 From: Grzegorz Piwowarek Date: Wed, 24 Jul 2024 10:23:48 +0300 Subject: [PATCH] GitHub Actions build (#2769) Replace inactive TravisCI build with GitHub Actions - Maven Central deployment will be implemented as a separate job ---- Resolves https://github.com/vavr-io/vavr/issues/2684 --- .github/workflows/build.yml | 23 ++++++++++ .travis.yml | 44 ------------------- src/main/java/io/vavr/control/Validation.java | 2 +- 3 files changed, 24 insertions(+), 45 deletions(-) create mode 100644 .github/workflows/build.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..4549def9b --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,23 @@ +name: build and test +on: + push: + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + java: [ '8', '11', '17' ] + architecture: [ 'x64' ] + name: Build with JDK ${{ matrix.java }} on ${{ matrix.architecture }} + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: ${{ matrix.java }} + architecture: ${{ matrix.architecture }} + cache: 'gradle' + - uses: gradle/actions/setup-gradle@v3 + - run: ./gradlew check --info --warning-mode all + - uses: codecov/codecov-action@v3 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 34ffa7315..000000000 --- a/.travis.yml +++ /dev/null @@ -1,44 +0,0 @@ -language: java - -sudo: false -dist: trusty - -install: echo "Disabled Travis CI 'install' stage by default" - -env: - global: - - # ossrhUsername - - secure: GwuNkNkV6QUnThmV+ZsiPuR+M50sVN+7qT+Ca9qRiXAhbUJpV0kcQz+NSV/gDE9UmsdzKfPzsSaKPjtIbKN9gFzFsOCd99TXGD1n3Kkya//Pw1ziDOtZFI9EMjO/8qPIEIR+Cfk7niqpyET/ypC7aklxv8raiCVrPDXJ8TJWsYM= - - # ossrhPassword - - secure: i+gbt9z+eCnGV1TadNWPrkOgxmeTYUvfkQYOvVQ01cqkTeNL5YKoWx3cpoidEvx4Bj00XkNqXXvMEBViEgnVlA4Xqm8n/05WcVr6uJ/HFq1hkBTiVl5LJEvXH4NBVoEZJTY4h9B7ulMHqvhM9U/vTBYbjK+L+9OC6B+U/IJe2Ho= - -matrix: - include: - - jdk: oraclejdk8 - env: JAVA_VERSION=8 - - jdk: openjdk11 - env: JAVA_VERSION=11 DEPLOY=true - - jdk: openjdk16 - env: JAVA_VERSION=16 - - jdk: openjdk17 - env: JAVA_VERSION=17 - -before_cache: -- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock -- rm -fr $HOME/.gradle/caches/*/plugin-resolution/ -cache: - directories: - - "$HOME/.gradle/caches/" - - "$HOME/.gradle/wrapper/" - -before_install: -- export GRADLE_JAVA_HOME="$JAVA_HOME" -- unset _JAVA_OPTIONS - -script: -- ./gradlew check --info -Dorg.gradle.java.home="$GRADLE_JAVA_HOME" -- if [ -n "$(git status -su src-gen)" ]; then exit 1; fi - -after_success: -- if [[ -n $DEPLOY ]]; then bash <(curl -s https://codecov.io/bash); fi -- if [[ -n $DEPLOY ]] && [ "$TRAVIS_REPO_SLUG" == "vavr-io/vavr" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" == "master" ]; then ./gradlew uploadArchives -PossrhUsername="$ossrhUsername" -PossrhPassword="$ossrhPassword"; fi diff --git a/src/main/java/io/vavr/control/Validation.java b/src/main/java/io/vavr/control/Validation.java index f8813acea..216c8fb65 100644 --- a/src/main/java/io/vavr/control/Validation.java +++ b/src/main/java/io/vavr/control/Validation.java @@ -199,7 +199,7 @@ public static Validation, Seq> sequence(Iterable + *

* Usage example : * *

{@code