Create docs.yml #289
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Building workflow for moonlight | |
name: build | |
on: [push, pull_request] | |
jobs: | |
build: | |
name: Build & Tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up JDK 8 | |
uses: actions/setup-java@v2 | |
with: | |
java-version: '8' | |
distribution: 'adopt' | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Build with Gradle | |
run: ./gradlew build | |
# Tests running and static code analysis | |
- name: Gradle check | |
run: ./gradlew check | |
- name: Codecov update | |
uses: codecov/codecov-action@v2 | |
with: | |
token: "d76dfcb2-9baa-40e4-b07a-4b2647bcf3c4" | |
files: "./build/reports/jacoco/testCodeCoverageReport/testCodeCoverageReport.xml" | |
flags: unittests # optional | |
name: codecov-umbrella # optional | |
fail_ci_if_error: false # optional (default = false) | |
verbose: true # optional (default = false) | |
# analysis: | |
# name: Analysis | |
# runs-on: ubuntu-latest | |
# steps: | |
# - uses: actions/checkout@v2 | |
# with: | |
# fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | |
# - name: Set up JDK 11 | |
# uses: actions/setup-java@v1 | |
# with: | |
# java-version: 11 | |
# - 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 and analyze | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | |
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
# run: ./gradlew build sonarqube --info | |