Skip to content

Commit

Permalink
Replace Travis by GitHub actions
Browse files Browse the repository at this point in the history
  • Loading branch information
cesarsotovalero authored Mar 26, 2021
1 parent e2929de commit db4cc6c
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 44 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: build

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build:
strategy:
max-parallel: 1
matrix:
os: [ ubuntu-latest, windows-latest ]
java: [ 11 ]
runs-on: ${{ matrix.os }}
steps:
- name: "Checkout"
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Java ${{ matrix.java }}
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
- name: "Cache Local Maven Repository"
uses: actions/cache@v1
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: "CheckStyle"
run: mvn validate --errors
- name: "Compile and Install"
run: mvn clean install -DskipTests --errors
- name: "Unit Tests"
run: mvn test --errors --fail-at-end
- name: "Integration Tests"
run: mvn failsafe:integration-test --errors --fail-at-end
# The following is only executed on Ubuntu on Java 11
- name: "CodeCov"
if: matrix.os == 'ubuntu-latest' && matrix.java == 11 && github.repository == 'castor-software/depclean'
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unittests
- name: "Cache SonarCloud"
if: matrix.os == 'ubuntu-latest' && matrix.java == 11 && github.repository == 'castor-software/depclean'
uses: actions/cache@v1
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: "SonarCloud"
if: matrix.os == 'ubuntu-latest' && matrix.java == 11 && github.repository == 'castor-software/depclean'
run: mvn sonar:sonar -Dsonar.projectKey=castor-software_depclean -Dsonar.organization=castor-software -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=${{ secrets.SONAR_TOKEN }} -Dsonar.java.source=11 -Dsonar.java.target=11
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
37 changes: 0 additions & 37 deletions .travis.yml

This file was deleted.

5 changes: 0 additions & 5 deletions .travis/depclean-maven-plugin.sh

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# DepClean <img src="https://github.com/castor-software/depclean/blob/master/.img/logo.svg" align="left" height="135px" alt="DepClean logo"/>

[![Build Status](https://travis-ci.org/castor-software/depclean.svg?branch=master)](https://travis-ci.org/castor-software/depclean)
[![build](https://github.com/castor-software/depclean/actions/workflows/build.yml/badge.svg)](https://github.com/castor-software/depclean/actions/workflows/build.yml)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=castor-software_depclean&metric=alert_status)](https://sonarcloud.io/dashboard?id=castor-software_depclean)
[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=castor-software_depclean&metric=sqale_rating)](https://sonarcloud.io/dashboard?id=castor-software_depclean)
[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=castor-software_depclean&metric=reliability_rating)](https://sonarcloud.io/dashboard?id=castor-software_depclean)
Expand All @@ -13,7 +13,7 @@
[![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=castor-software_depclean&metric=ncloc)](https://sonarcloud.io/dashboard?id=castor-software_depclean)
[![Duplicated Lines (%)](https://sonarcloud.io/api/project_badges/measure?project=castor-software_depclean&metric=duplicated_lines_density)](https://sonarcloud.io/dashboard?id=castor-software_depclean)
[![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=castor-software_depclean&metric=sqale_index)](https://sonarcloud.io/dashboard?id=castor-software_depclean)
[![Coverage Status](https://coveralls.io/repos/github/castor-software/depclean/badge.svg?branch=master)](https://coveralls.io/github/castor-software/depclean?branch=master)
[![codecov](https://codecov.io/gh/castor-software/depclean/branch/master/graph/badge.svg?token=X0XE6R72OD)](https://codecov.io/gh/castor-software/depclean)

## What is DepClean?

Expand Down
7 changes: 7 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,13 @@
<failOnServiceError>false</failOnServiceError>
</configuration>
</plugin>
<!-- SonarCloud plugin -->
<plugin>
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<!-- see versions at https://search.maven.org/search?q=g:org.sonarsource.scanner.maven%20AND%20a:sonar-maven-plugin -->
<version>3.7.0.1746</version>
</plugin>
</plugins>
</pluginManagement>

Expand Down

0 comments on commit db4cc6c

Please sign in to comment.