Skip to content

Merge pull request #239 from cnescatlab/hotfix/draft-releases #90

Merge pull request #239 from cnescatlab/hotfix/draft-releases

Merge pull request #239 from cnescatlab/hotfix/draft-releases #90

# Description
# ===========
# This workflow is triggered each time
# commits are pushed to GitHub or a pull request is opened.
# It launches three jobs in parallel : a build with java 8,
# a build with java 11 and a SonarCloud analysis.
---
name: Java CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ '8', '11' ]
name: Java ${{ matrix.Java }} CI
steps:
- name: Check out repository code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup java
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: ${{ matrix.java }}
- name: Cache Maven packages
uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Cache node_modules
uses: actions/cache@v2
with:
path: node_modules
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
restore-keys: ${{ runner.os }}-yarn-
- name: Build with Maven
run: mvn -B clean install