From 76c40aeb2d7c16c1dbd7ee67c8576069dce28837 Mon Sep 17 00:00:00 2001 From: Christopher Tubbs Date: Tue, 4 Aug 2020 17:31:07 -0400 Subject: [PATCH] Update CI with GitHub Actions --- .github/workflows/maven.yaml | 47 ++++++++++++++++++++++++++++++++++++ .travis.yml | 17 ------------- README.md | 18 ++++++++------ pom.xml | 10 +++++--- 4 files changed, 64 insertions(+), 28 deletions(-) create mode 100644 .github/workflows/maven.yaml delete mode 100644 .travis.yml diff --git a/.github/workflows/maven.yaml b/.github/workflows/maven.yaml new file mode 100644 index 0000000..d456a91 --- /dev/null +++ b/.github/workflows/maven.yaml @@ -0,0 +1,47 @@ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# 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: mvn verify + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macOS-latest] + fail-fast: false + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 11 + uses: actions/setup-java@v1 + with: + java-version: 11 + - name: Cache local maven repository + uses: actions/cache@v2 + with: + path: ~/.m2 + key: ${{ matrix.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ matrix.os }}-m2 + - name: Build with Maven + run: mvn -B -V -e "-Dstyle.color=always" verify + env: + MAVEN_OPTS: -Djansi.force=true + diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 6c60bb1..0000000 --- a/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -language: java - -jdk: - - openjdk11 - diff --git a/README.md b/README.md index 7463c1e..07ef0c1 100644 --- a/README.md +++ b/README.md @@ -12,13 +12,14 @@ limitations under the License. --> -[![Build Status][travis_img]][travis_link] [![Maven Central][maven_img]][maven_link] +[![mvn verify][ci_img]][ci_link] +[![Maven Central][maven_img]][maven_link] +[![License][license_img]][license_link] -warbucks-maven-plugin -====================== +# warbucks-maven-plugin View this plugin's documentation at: -http://code.revelc.net/warbucks-maven-plugin +https://code.revelc.net/warbucks-maven-plugin A Maven plugin to enforce the requirement for particular annotations (for specified classes). @@ -26,9 +27,10 @@ specified classes). This plugin uses [Semantic Versioning 2.0.0][1] for its own versioning. Its public API is the names of the goals and configuration options. -[1]: http://semver.org/spec/v2.0.0.html -[travis_img]: https://travis-ci.org/revelc/warbucks-maven-plugin.svg?branch=main -[travis_link]: https://travis-ci.org/revelc/warbucks-maven-plugin +[1]: https://semver.org/spec/v2.0.0.html +[ci_img]: https://github.com/revelc/warbucks-maven-plugin/workflows/mvn%20verify/badge.svg +[ci_link]: https://github.com/revelc/warbucks-maven-plugin/actions +[license_img]: https://img.shields.io/badge/license-Apache%202.0-blue.svg +[license_link]: https://github.com/revelc/warbucks-maven-plugin/blob/main/LICENSE [maven_img]: https://maven-badges.herokuapp.com/maven-central/net.revelc.code/warbucks-maven-plugin/badge.svg [maven_link]: https://maven-badges.herokuapp.com/maven-central/net.revelc.code/warbucks-maven-plugin - diff --git a/pom.xml b/pom.xml index e5327b2..f0ccdc9 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ See the License for the specific language governing permissions and limitations under the License. --> - + 4.0.0 org.apache @@ -25,7 +25,7 @@ maven-plugin Warbucks Maven Plugin A Maven plugin to enforce the requirement for particular annotations (for specified classes) - http://code.revelc.net/warbucks-maven-plugin + https://code.revelc.net/warbucks-maven-plugin 2016 Revelc @@ -34,7 +34,7 @@ Apache License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0 + https://www.apache.org/licenses/LICENSE-2.0 repo @@ -59,6 +59,10 @@ GitHub https://github.com/revelc/warbucks-maven-plugin/issues + + GitHub + https://github.com/revelc/warbucks-maven-plugin/actions +