Skip to content

Commit

Permalink
Ajout de l'intégration continue GitHub
Browse files Browse the repository at this point in the history
  • Loading branch information
ivandalbosco committed Oct 21, 2021
1 parent 910b9e9 commit fa1de32
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 1 deletion.
38 changes: 38 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# 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
# Uses a Maven cache to reduce traffic to Maven Central and speed up the build, see: https://github.com/marketplace/actions/maven-cache

name: CI with Maven

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: '45 3 * * WED'

jobs:
build-and-sonar:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up JDK 8
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'
- name: Restore Maven cache
uses: skjolber/maven-cache-github-action@v1
with:
step: restore
- name: Build and analyze with Sonar
run: mvn -B -U verify sonar:sonar -Dsonar.projectKey=ch.ge.cti.ct.referentiels:referentiels-ofs -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=etat-de-geneve-github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- name: Save Maven cache
uses: skjolber/maven-cache-github-action@v1
with:
step: save
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<developerConnection>scm:git:${env.GITLAB_URL}/Communs/referentiels-ofs.git</developerConnection>
<connection>scm:git:${env.GITLAB_URL}/Communs/referentiels-ofs.git</connection>
<url>git:${env.GITLAB_URL}/Communs/referentiels-ofs.git</url>
<tag>referentiels-ofs-parent-1.4.2</tag>
<tag>head</tag>
</scm>

<distributionManagement>
Expand Down

0 comments on commit fa1de32

Please sign in to comment.