Feature/3264 structured output #373
Workflow file for this run
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
# Continuous Integration (CI) to Build & Test & Coverage & Lint. | |
# ~~ | |
name: CI | |
on: | |
pull_request: | |
branches: [ master, '**' ] | |
push: | |
branches: [ master ] | |
jobs: | |
validate: | |
name: Validate Code | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: corretto | |
java-version: '11' | |
cache: 'sbt' | |
- name: Validate Code | |
run: sbt validateCode | |
build: | |
name: Build & Test | |
needs: [ validate ] | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
matrix: | |
scala: [ '2.12.18', '2.13.11', '3.2.2'] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'corretto' | |
java-version: '11' | |
cache: 'sbt' | |
- name: Build & Test | |
run: sbt ++${{ matrix.scala }} clean testWithCoverage | |
- name: Upload coverage report (all) | |
uses: actions/[email protected] | |
with: | |
name: coverage-report-${{ matrix.scala }} | |
path: ${{github.workspace}}/target/scala-${{ matrix.scala }}/coverage-report | |
optional-build: | |
name: Build (Optional) | |
continue-on-error: ${{ matrix.experimental }} | |
needs: [ validate ] | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
matrix: | |
distribution: [ 'corretto' ] | |
jdk: [ '11' ] | |
scala: [ '2.12.18', '2.13.11', '3.2.2'] | |
experimental: [ false ] | |
include: | |
- jdk: '17' | |
distribution: 'corretto' | |
scala: '2.13.11' | |
experimental: true | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: ${{ matrix.distribution }} | |
java-version: ${{ matrix.jdk }} | |
cache: 'sbt' | |
- name: Perform Build / Test | |
run: sbt ++${{ matrix.scala }} clean compile test | |
# coverage: | |
# name: Coverage Report | |
# if: ${{ github.event.pull_request }} | |
# needs: [ build ] | |
# runs-on: ubuntu-latest | |
# steps: | |
# - uses: actions/download-artifact@v3 | |
# with: | |
# name: cobertura.xml | |
# | |
# - name: Analyzing coverage report | |
# uses: 5monkeys/cobertura-action@master | |
# with: | |
# path: cobertura.xml | |
# only_changed_files: true | |
# fail_below_threshold: true | |
# show_missing: true | |
# show_line: true | |
# show_branch: true | |
# show_class_names: true | |
# link_missing_lines: true | |
# minimum_coverage: 75 | |
ready-to-merge: | |
name: Ready to Merge | |
if: ${{ github.event.pull_request }} | |
needs: [ optional-build ] | |
runs-on: ubuntu-latest | |
steps: | |
- run: echo 'Ready to merge.' |