Skip to content

Usability improvement: make PluginConfig accept ModuleBase instead of PluginBase #621

Usability improvement: make PluginConfig accept ModuleBase instead of PluginBase

Usability improvement: make PluginConfig accept ModuleBase instead of PluginBase #621

Workflow file for this run

name: Build
on:
workflow_dispatch:
inputs: {}
push:
branches: [ "develop" ]
tags: [ "v**" ]
pull_request:
branches: [ "develop" ]
jobs:
checksecret:
runs-on: ubuntu-latest
outputs:
HAVE_SECRETS: ${{ steps.checksecret_job.outputs.HAVE_SECRETS }}
steps:
- id: checksecret_job
env:
OPENSSL_IV: ${{ secrets.OPENSSL_IV }}
OPENSSL_KEY: ${{ secrets.OPENSSL_KEY }}
run: |
echo "HAVE_SECRETS=${{ env.OPENSSL_IV != '' && env.OPENSSL_KEY != '' }}" >> $GITHUB_OUTPUT
build-jvm:
runs-on: ubuntu-latest
needs: [ 'checksecret' ]
strategy:
matrix:
java: [ '11', '17' ]
scala: [ '2.12', '2.13', '3' ]
steps:
- uses: 7mind/github-env@main
with:
java-version: ${{ matrix.java }}
- name: Build and Test with Coverage
if: matrix.scala != '3'
run: |
bash sbtgen.sc
bash .build.sh ${{ matrix.scala }} coverage
- name: Build and Test without Coverage # coverage leads to verification errors on scala3
if: matrix.scala == '3'
run: |
bash sbtgen.sc
bash .build.sh ${{ matrix.scala }} test
- uses: dorny/test-reporter@v1
if: (needs.checksecret.outputs.HAVE_SECRETS == 'true') && (success() || failure())
# continue-on-error: ${{ matrix.scala == '3' }}
with:
name: Test reports (JDK ${{ matrix.java }}, Scala ${{ matrix.scala }}, JVM)
path: '**/target/test-reports/TEST-*.xml'
reporter: java-junit
# fail-on-error: ${{ matrix.scala != '3' }}
- uses: codecov/codecov-action@v3
if: needs.checksecret.outputs.HAVE_SECRETS == 'true'
with:
token: ${{ secrets.TOKEN_CODECOV }} # not required for public repos but works unreliable without it
verbose: true # optional (default = false)
# fail_ci_if_error: ${{ matrix.scala != '3' }}
files: cobertura.xml
# TODO: do we need scoverage.xml? If so files: may be just omitted
# files: cobertura.xml,scoverage.xml
# flags: unittests
- name: Upload dependency graph
uses: scalacenter/sbt-dependency-submission@ab086b50c947c9774b70f39fc7f6e20ca2706c91
build-js:
runs-on: ubuntu-latest
needs: [ 'checksecret' ]
strategy:
matrix:
java: [ '11', '17' ]
scala: [ '2.12', '2.13', '3' ]
steps:
- uses: 7mind/github-env@main
with:
java-version: ${{ matrix.java }}
- name: Build and Test with Coverage
if: matrix.scala != '3'
run: |
bash sbtgen.sc --nojvm --js
bash .build.sh ${{ matrix.scala }} coverage
- name: Build and Test without Coverage # coverage leads to verification errors on scala3
if: matrix.scala == '3'
run: |
bash sbtgen.sc --nojvm --js
bash .build.sh ${{ matrix.scala }} test
- uses: dorny/test-reporter@v1
if: (needs.checksecret.outputs.HAVE_SECRETS == 'true') && (success() || failure())
# continue-on-error: ${{ matrix.scala == '3' }}
with:
name: Test reports (JDK ${{ matrix.java }}, Scala ${{ matrix.scala }}, JS)
path: '**/target/test-reports/TEST-*.xml'
reporter: java-junit
# fail-on-error: ${{ matrix.scala != '3' }}
test-site:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ '17' ]
scala: [ '2.13']
steps:
- uses: 7mind/github-env@main
with:
java-version: ${{ matrix.java }}
- name: Build Microsite
run: |
bash sbtgen.sc --js
bash .build.sh ${{ matrix.scala }} site-test
publish-site:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ '17' ]
scala: [ '2.13']
needs: [ 'build-jvm', 'build-js', 'test-site', 'checksecret' ]
if: needs.checksecret.outputs.HAVE_SECRETS == 'true'
steps:
- uses: 7mind/github-env@main
with:
java-version: ${{ matrix.java }}
- uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.IZUMI_MICROSITE_KEY }}
known_hosts: 'unnecessary' # github.com is already there
- name: Publish Microsite
run: |
bash sbtgen.sc --js
bash .build.sh ${{ matrix.scala }} site-publish
publish-artifacts:
runs-on: ubuntu-latest
needs: [ 'build-jvm', 'build-js', 'checksecret' ]
if: needs.checksecret.outputs.HAVE_SECRETS == 'true'
strategy:
matrix:
java: [ '11' ]
scala: [ '2.12', '2.13', '3']
steps:
- uses: 7mind/github-env@main
with:
java-version: ${{ matrix.java }}
- name: Build and Publish to Sonatype
# continue-on-error: ${{ matrix.scala == '3' }}
env:
OPENSSL_IV: ${{ secrets.OPENSSL_IV }}
OPENSSL_KEY: ${{ secrets.OPENSSL_KEY }}
run: |
bash sbtgen.sc --js
bash .build.sh ${{ matrix.scala }} secrets publishScala
all-good:
runs-on: ubuntu-latest
needs: [ 'build-jvm', 'build-js', 'test-site' ]
steps:
- run: 'echo "No build required"'