Skip to content

Commit

Permalink
[Build] GH actions - coverage, devModel, skip CI on release (TouK#1381)
Browse files Browse the repository at this point in the history
* [Build] Coverage, addDevModel, don't build after release for Github actions

* changelog
  • Loading branch information
mproch authored Jan 20, 2021
1 parent 3c2df0b commit c857206
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
branches:
- master
- staging
#TODO: currently release is done manually, we don't want to run this pipeline on released version, to avoid accidental pushes
tags-ignore:
- '**'
env:
#we use this variable in ciRunSbt.sh
CROSS_BUILD: ${{ github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/master' || startsWith(github.head_ref, 'preview') }}
Expand Down Expand Up @@ -61,8 +64,12 @@ jobs:
restore-keys: ${{ runner.os }}-sbt
- name: Backend tests
shell: bash
#TODO: coverage?
run: ./ciRunSbt.sh test
run: ./ciRunSbt.sh coverage test coverageReport
- name: Upload Coverage data to Coveralls
shell: bash
run: ./ciRunSbt.sh coverageAggregate coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}

crossCompile:
name: CrossCompile
Expand Down Expand Up @@ -169,6 +176,8 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: 14.11.0
- name: Setup npm
run: (cd ui/client; npm ci)
- name: Cache ivy packages
uses: actions/cache@v2
with:
Expand Down Expand Up @@ -239,6 +248,7 @@ jobs:
nexusUrl: https://oss.sonatype.org/content/repositories/snapshots
nexusUser: ${{ secrets.SONATYPE_USER }}
nexusPassword: ${{ secrets.SONATYPE_PASSWORD }}
addDevModel: ${{ github.ref == 'refs/heads/staging' }}
#TODO: handle version better
run: sbt -J-Xms1000M -J-Xmx1000M "set version in ThisBuild := (version in ThisBuild).value.replace(\"-SNAPSHOT\", \"-$(date -I)-$GITHUB_RUN_NUMBER-$GITHUB_SHA-ghactionstest-SNAPSHOT\")" publish dist/docker:publish

6 changes: 5 additions & 1 deletion docs/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ Nussknacker versions
* [#1361](https://github.com/TouK/nussknacker/pull/1361) Lazy vars removal
* [#1363](https://github.com/TouK/nussknacker/pull/1363) Open/close only services that are actually used in process
* [#1367](https://github.com/TouK/nussknacker/pull/1367) Custom actions - first, experimental version

* Migration of CI to github actions
* [#1368](https://github.com/TouK/nussknacker/pull/1368) Publish docker images/jars via GH actions (experimental)
* [#1381](https://github.com/TouK/nussknacker/pull/1381) Use GH Actions for coverage
* [#1383](https://github.com/TouK/nussknacker/pull/1383) Switch github badges

0.3.1 (not released yet)
------------------------
* Performance fixes:
Expand Down
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.5.1")

addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.5.1")

addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.2.7")
addSbtPlugin("net.ruippeixotog" % "sbt-coveralls" % "1.3.0") // fork with scoverage/sbt-coveralls#128 merged in

addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.0")

0 comments on commit c857206

Please sign in to comment.