Migrating to Github Actions

This commit is contained in:
Marcin Grzejszczak
2021-02-18 11:14:52 +01:00
parent 6853294573
commit 232e44ad3b
2 changed files with 31 additions and 53 deletions

View File

@@ -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

31
.github/workflows/maven.yml vendored Normal file
View File

@@ -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