Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace Travis with GH action workflow #17

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 87 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle

name: Java CI with Gradle

on:
push:
pull_request:
types: [opened, synchronize, reopened]

jobs:
linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install wheel
run: pip install -U wheel pip
- name: Install moto
run: pip install moto[server]
- name: Cache SonarCloud packages
uses: actions/cache@v1
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Cache Gradle packages
uses: actions/cache@v1
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Build
run: ./gradlew assemble
- name: Check
run: ./gradlew check jacocoIntegrationTestReport jacocoTestReport
- name: SonarCloud analysis
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: ./gradlew sonarqube
- name: Unit coverage reports
uses: codecov/codecov-action@v1
with:
files: build/reports/jacoco/test/jacocoTestReport.xml
flags: unit,jdk11,${{ runner.os }}
- name: Integration coverage reports
uses: codecov/codecov-action@v1
with:
files: build/reports/jacoco/jacocoIntegrationTestReport/jacocoIntegrationTestReport.xml
flags: integration,jdk11,${{ runner.os }}
osx:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Cache Gradle packages
uses: actions/cache@v1
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Build
run: ./gradlew assemble
- name: Check
run: ./gradlew test jacocoTestReport
- name: Unit coverage reports
uses: codecov/codecov-action@v1
with:
files: build/reports/jacoco/test/jacocoTestReport.xml
flags: unit,jdk11,${{ runner.os }}
57 changes: 0 additions & 57 deletions .travis.yml

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 @@
# xenon-adaptors-cloud

[![Build Status](https://travis-ci.org/xenon-middleware/xenon-adaptors-cloud.svg?branch=master)](https://travis-ci.org/xenon-middleware/xenon-adaptors-cloud)
[![Java CI with Gradle](https://github.com/xenon-middleware/xenon-adaptors-cloud/actions/workflows/build.yml/badge.svg)](https://github.com/xenon-middleware/xenon-adaptors-cloud/actions/workflows/build.yml)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=xenon-middleware_xenon-adaptors-cloud&metric=alert_status)](https://sonarcloud.io/dashboard?id=xenon-middleware_xenon-adaptors-cloud)
[![codecov](https://codecov.io/gh/xenon-middleware/xenon-adaptors-cloud/branch/master/graph/badge.svg)](https://codecov.io/gh/xenon-middleware/xenon-adaptors-cloud)
[![DOI](https://zenodo.org/badge/136933840.svg)](https://zenodo.org/badge/latestdoi/136933840)
Expand Down Expand Up @@ -48,7 +48,7 @@ and then run live test command:
-Dxenon.filesystem.basedir=/ -Dxenon.filesystem.expected.workdir=/
```

To run the live tests on Microsoft Azure, first create a container containing the test fixtures mentioned above and run the following test command:
To run the live tests on Microsoft Azure, first create a container containing the test fixtures mentioned above and run the following test command:

```sh
./gradlew liveTest -Dxenon.filesystem=azure \
Expand Down