diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml new file mode 100644 index 000000000..73ca425dc --- /dev/null +++ b/.github/workflows/maven.yml @@ -0,0 +1,28 @@ +# 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: Java CI with Maven + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +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: Build with Maven + run: mvn clean install -DskipTests -B -V + && sh ./tools/check_format.sh + && mvn clean test + - name: Codecov + uses: codecov/codecov-action@v1 diff --git a/README.md b/README.md index 1d3535c42..e589ab84e 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # SOFARegistry -[![Build Status](https://travis-ci.com/alipay/sofa-registry.svg?branch=master)](https://travis-ci.com/sofastack/sofa-registry) +[![Java CI with Maven](https://github.com/sofastack/sofa-registry/actions/workflows/maven.yml/badge.svg)](https://github.com/sofastack/sofa-registry/actions/workflows/maven.yml) ![license](https://img.shields.io/badge/license-Apache--2.0-green.svg) [![Coverage Status](https://codecov.io/gh/alipay/sofa-registry/branch/master/graph/badge.svg)](https://codecov.io/gh/sofastack/sofa-registry) ![maven](https://img.shields.io/github/release/sofastack/sofa-registry.svg)