From 232e44ad3b6205073e0cac8cd1efbf93f2adfb20 Mon Sep 17 00:00:00 2001 From: Marcin Grzejszczak Date: Thu, 18 Feb 2021 11:14:52 +0100 Subject: [PATCH] Migrating to Github Actions --- .circleci/config.yml | 53 ------------------------------------- .github/workflows/maven.yml | 31 ++++++++++++++++++++++ 2 files changed, 31 insertions(+), 53 deletions(-) delete mode 100644 .circleci/config.yml create mode 100644 .github/workflows/maven.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index bec2ac981c..0000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,53 +0,0 @@ -version: 2 -jobs: - build: - docker: - - image: cloudpipelines/pipeline-base - environment: - JAVA_TOOL_OPTIONS: "-Xms64m -Xmx250m" - GRADLE_OPTS: '-Dorg.gradle.jvmargs="-Xms64m -Xmx250m -XX:+HeapDumpOnOutOfMemoryError" -Dorg.gradle.daemon=false' - TERM: dumb - branches: - ignore: - - gh-pages # list of branches to ignore - steps: - - setup_remote_docker - - checkout - - restore_cache: - key: sc-contract-{{ .Branch }} - - run: - name: "Download dependencies" - command: ./scripts/downloadDependencies.sh - - save_cache: - key: sc-contract-{{ .Branch }} - paths: - - ~/.m2 - - ~/.gradle - - run: - name: "Adding daemon entries for Gradle" - command: touch ~/.gradle/gradle.properties && echo "org.gradle.daemon=false" >> ~/.gradle/gradle.properties - - run: - name: "Clearing caches" - command: rm -rf ~/.m2/repository/org/springframework/cloud/contract && rm -rf ~/.m2/repository/com/example - - run: - name: "Running build" - command: ./scripts/ciBuild.sh - - run: - name: "Aggregate test results" - when: always - command: | - mkdir -p $CIRCLE_TEST_REPORTS/junit/ - find . -type f -regex ".*/target/.*-reports/.*" -exec cp {} $CIRCLE_TEST_REPORTS/junit/ \; - find . -type f -regex ".*/build/test-results/.*" -exec cp {} $CIRCLE_TEST_REPORTS/junit/ \; - bash <(curl -s https://codecov.io/bash) - - store_artifacts: - path: /junit/ - destination: artifacts - - store_test_results: - path: /junit/ - destination: testartifacts -notify: - webhooks: - # A list of hook hashes, containing the url field - # gitter hook - - url: https://webhooks.gitter.im/e/ece0ece9a76a5af2aa91 diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml new file mode 100644 index 0000000000..e6b32f5e3b --- /dev/null +++ b/.github/workflows/maven.yml @@ -0,0 +1,31 @@ +# This workflow will build a Java project with Maven +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven + +name: Build + +on: + push: + branches: [ 2.2.x ] + pull_request: + branches: [ 2.2.x ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + - name: Cache local Maven repository + uses: actions/cache@v2 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + - name: Build with Maven + run: ./mvnw clean install -B -U