From aa821a9ca00f684c201eed4db14a44cc84bb6dfb Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Thu, 14 Jan 2021 16:24:30 -0600 Subject: [PATCH] Issue 141: migrate travis-ci to githubactions. --- .github/workflows/build.yml | 31 ++++++++++++++++++++++++++++ .github/workflows/ghpages.yml | 38 +++++++++++++++++++++++++++++++++++ .travis.yml | 21 ------------------- README.md | 3 ++- 4 files changed, 71 insertions(+), 22 deletions(-) create mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/ghpages.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..eedf96bf --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,31 @@ +name: Build + +on: [ push, pull_request, workflow_dispatch ] + +jobs: + java: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: "Maven Cache" + uses: actions/cache@v2 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-cache-maven-${{ hashFiles('**/pom.xml') }} + + - name: "Setup Java" + uses: actions/setup-java@v1 + with: + java-version: 1.8 + + - name: "Maven Test" + run: mvn clean test cobertura:cobertura jacoco:report coveralls:report -DdryRun=true + + - name: "Send to Coveralls (build java-${{ github.run_number }})" + uses: MikeEdgar/github-action@raw_coverage_file + with: + github-token: ${{ secrets.github_token }} + path-to-file: './target/coveralls.json' + coverage-format: raw diff --git a/.github/workflows/ghpages.yml b/.github/workflows/ghpages.yml new file mode 100644 index 00000000..2ddd90ae --- /dev/null +++ b/.github/workflows/ghpages.yml @@ -0,0 +1,38 @@ +name: GHPages + +on: + push: + branches: + - $default_branch + + workflow_dispatch: + +jobs: + ghpages: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: "Maven Cache" + uses: actions/cache@v2 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-cache-maven-${{ hashFiles('**/pom.xml') }} + + - name: "Setup Java" + uses: actions/setup-java@v1 + with: + java-version: 1.8 + + - name: "Maven Test" + run: mvn clean test cobertura:cobertura jacoco:report coveralls:report -DdryRun=true + + - name: "Deploy GH-Pages" + uses: JamesIves/github-pages-deploy-action@3.7.1 + with: + github_token: ${{ secrets.github_token }} + branch: gh-pages + folder: target/generated-docs + clean: true + single_commit: true diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index dbfe6c31..00000000 --- a/.travis.yml +++ /dev/null @@ -1,21 +0,0 @@ -language: java - -jdk: - - openjdk8 - -install: - - mvn test-compile -DskipTests=true -Dmaven.javadoc.skip=true -B -V - -after_success: - - mvn clean test cobertura:cobertura jacoco:report coveralls:report - -# Deploy Github pages after success of Java Tests. -deploy: - provider: pages - skip_cleanup: true - keep-history: false - target-branch: gh-pages - github_token: "$GITHUB_TOKEN" - local_dir: "./target/generated-docs" - on: - branch: master diff --git a/README.md b/README.md index 76a5572e..27be3a13 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ -[![Build Status](https://travis-ci.org/TAMULib/ProjectManagementService.svg?branch=master)](https://travis-ci.org/TAMULib/ProjectManagementService) [![Coverage Status](https://coveralls.io/repos/github/TAMULib/ProjectManagementService/badge.svg?branch=master)](https://coveralls.io/github/TAMULib/ProjectManagementService?branch=master) +[![Build Status](https://github.com/TAMULib/ProjectManagementService/workflows/Build/badge.svg)](https://github.com/TAMULib/ProjectManagementService/actions?query=workflow%3ABuild) +[![Coverage Status](https://coveralls.io/repos/github/TAMULib/ProjectManagementService/badge.svg)](https://coveralls.io/github/TAMULib/ProjectManagementService) # Product Management Service The Product Management Service is designed to connect our Library Webservice Status Application to our Version Management Software.