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

EA-3623 add github action on push #27

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
35 changes: 35 additions & 0 deletions .github/workflows/build_test_analyse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build, Run Tests and Sonar Analysis
on: push

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
# Shallow clones should be disabled for a better relevancy of analysis
fetch-depth: 0
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Cache Maven packages
uses: actions/cache@v1
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Cache SonarCloud packages
uses: actions/cache@v1
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Build, run tests and analyse
run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Pcoverage -Dsonar.projectKey=eu.europeana:thumbnail-api
env:
# Needed to get some information about the pull request, if any
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# SonarCloud access token should be generated from https://sonarcloud.io/account/security/
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
21 changes: 21 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,26 @@
<version>0.7.2-SNAPSHOT</version>
<packaging>war</packaging>

<repositories>
<repository>
<id>libs-release-local</id>
<name>europeana-releases</name>
<url>https://artifactory.eanadev.org/artifactory/libs-release</url>
</repository>
<repository>
<id>libs-snapshots-local</id>
<name>europeana-snapshots</name>
<url>https://artifactory.eanadev.org/artifactory/libs-snapshot</url>
</repository>
<!-- repo for plugins, required to resolve git-commit-id -->
<repository>
<id>plugins-release</id>
<name>artifactory plugins-release</name>
<url>https://artifactory.eanadev.org/artifactory/plugins-release</url>
</repository>
</repositories>


<name>Thumbnail API</name>
<description>Spring-Boot2 application for providing CHO thumbnail images</description>

Expand All @@ -22,6 +42,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<sonar.organization>europeana</sonar.organization>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>

<object-storage.version>1.10</object-storage.version>
<api-commons.version>0.3.9</api-commons.version>
Expand Down
Loading