Skip to content

Commit

Permalink
chore(release): merge beta branch into main
Browse files Browse the repository at this point in the history
First stable release 😍
  • Loading branch information
nicolasfara authored Aug 12, 2022
2 parents 46abf2b + 678b247 commit 560ac63
Show file tree
Hide file tree
Showing 106 changed files with 5,054 additions and 252 deletions.
29 changes: 20 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,8 @@ jobs:
export SCALA_VERSION=`sbt --no-colors --error 'set aggregate := false; print scalaVersion'`
echo "::set-output name=scala-version::$SCALA_VERSION"
- name: Scalafmt
run: sbt scalafmtCheckAll

- name: Scalafix
run: sbt 'scalafixAll --check'

- name: WartRemover
run: sbt wartremoverInspect
- name: Quality Assurance
run: sbt qaCheck

- name: Test
run: sbt test
Expand All @@ -58,17 +52,34 @@ jobs:
files: ./target/scala-${{steps.get-scala-version.outputs.scala-version}}/jacoco/report/aggregate/jacoco.xml
verbose: true

- name: Build docsite
run: sbt ubidocGenerate

publish:
name: Publish
needs: [build]
runs-on: ubuntu-22.04
if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/alpha' || github.ref == 'refs/heads/beta')
steps:
- name: Setup atedeg-bot
id: atedeg-bot
uses: tibdex/[email protected]
with:
app_id: ${{ secrets.ATEDEG_BOT_APP_ID }}
private_key: ${{ secrets.ATEDEG_BOT_PRIVATE_KEY }}

- name: Checkout current branch
uses: actions/checkout@v3
with:
token: ${{ steps.atedeg-bot.outputs.token }}
fetch-depth: 0

- name: Login to Docker Hub
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Release
uses: atedeg/[email protected]
with:
Expand All @@ -77,4 +88,4 @@ jobs:
pgp-passphrase: ${{ secrets.PGP_PASSPHRASE }}
sonatype-username: ${{ secrets.SONATYPE_USERNAME }}
sonatype-password: ${{ secrets.SONATYPE_PASSWORD }}
github-token: ${{ secrets.GITHUB_TOKEN }}
github-token: ${{ steps.atedeg-bot.outputs.token }}
38 changes: 38 additions & 0 deletions .github/workflows/publish-site.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Publish site

on:
workflow_run:
workflows: [Build test and deploy]
types:
- completed

jobs:
publish-site:
runs-on: ubuntu-22.04
steps:
- name: Setup atedeg-bot
id: atedeg-bot
uses: tibdex/[email protected]
with:
app_id: ${{ secrets.ATEDEG_BOT_APP_ID }}
private_key: ${{ secrets.ATEDEG_BOT_PRIVATE_KEY }}

- name: Checkout current branch
uses: actions/checkout@v3
with:
token: ${{ steps.atedeg-bot.outputs.token }}
fetch-depth: 0

- name: Build documentation site
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
run: |
export LAST_VERSION=`git describe --tags --abbrev=0 | sed -e 's/^v*//'`
sbt 'set ThisBuild / version := System.getenv("LAST_VERSION")' ubidocGenerate
- name: Deploy site
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
uses: JamesIves/[email protected]
with:
GITHUB_TOKEN: ${{ steps.atedeg-bot.outputs.token }}
BRANCH: gh-pages
FOLDER: target/site
28 changes: 0 additions & 28 deletions .github/workflows/site.yml

This file was deleted.

14 changes: 13 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
*.semanticdb

### Intellij ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

.idea/
.bloop/
.bsp/

# metals
project/metals.sbt
.metals

# vs code
.vscode

# CMake
cmake-build-*/

Expand Down Expand Up @@ -33,6 +43,8 @@ lib_managed/
src_managed/
project/boot/
project/plugins/project/
project/project/
project/target/
.history
.cache
.lib/
Expand All @@ -45,5 +57,5 @@ project/plugins/project/
hs_err_pid*

node_modules/

_includes/
*.semanticdb
1 change: 1 addition & 0 deletions .releaserc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ plugins:
- publishCmd: |
export CI_COMMIT_TAG="true"
sbt ci-release
sbt 'set ThisBuild / version := "${nextRelease.version}"' docker:publish
- - '@semantic-release/git'
- assets:
- CHANGELOG.md
Expand Down
3 changes: 1 addition & 2 deletions .scalafix.conf
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,5 @@ DisableSyntax {
noDefaultArgs = true
noFinalVal = true
noFinalize = true
noValPatterns = true
noUniversalEquality = false # Disabled because of -language:strictEquality compiler flag
noUniversalEquality = true
}
15 changes: 6 additions & 9 deletions .scalafmt.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,8 @@ maxColumn = 120
includeCurlyBraceInSelectChains = false

# Newlines
newlines.penalizeSingleSelectMultiArgList = false
newlines.topLevelStatementBlankLines = [
{
blanks { before = 1 }
}
]
newlines.alwaysBeforeElseAfterCurlyIf = false
newlines.beforeCurlyLambdaParams = never

# Docstring
docstrings.style = Asterisk
Expand All @@ -29,7 +25,10 @@ align.preset = none
align.openParenDefnSite = false

# Rewrite
rewrite.rules = [SortModifiers, PreferCurlyFors, Imports]
rewrite.scala3.convertToNewSyntax = true
rewrite.scala3.removeOptionalBraces = yes
rewrite.rules = [SortModifiers, PreferCurlyFors, Imports, RedundantBraces]
rewrite.redundantBraces.stringInterpolation = true
rewrite.imports.sort = scalastyle
rewrite.imports.groups = [
["javax?\\..*", "scala\\..*"],
Expand All @@ -45,5 +44,3 @@ rewrite.sortModifiers.order = [
spaces.inImportCurlyBraces = true

trailingCommas = always

rewrite.scala3.convertToNewSyntax = true
135 changes: 135 additions & 0 deletions .ubidoc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
tables:
- name: "stocking-ul"
rows:
- class: "AvailableStock"
- class: "DesiredStock"
- class: "AvailableQuantity"
- class: "DesiredQuantity"
- class: "MissingQuantity"
- enum: "Batch"
- enum: "QualityAssuredBatch"
- class: "BatchID"
name: "Batch ID"
- class: "LabelledProduct"
- name: "stocking-outgoing"
rows:
- case: "OutgoingEvent.ProductStocked"
- case: "OutgoingEvent.ProductPalletized"
- name: "stocking-incoming"
rows:
- case: "IncomingEvent.BatchReadyForQualityAssurance"
- case: "IncomingEvent.ProductRemovedFromStock"
- case: "IncomingEvent.NewBatch"
- name: "milk-planning-ul"
termName: "Term"
definitionName: "Definition"
rows:
- class: "ProcessedMilk"
- class: "QuintalsOfMilk"
- class: "Yield"
- type: "RecipeBook"
- type: "Stock"
- class: "StockedQuantity"
- class: "Quantity"
- class: "RequestedProduct"

- name: "milk-planning-incoming"
termName: "Event"
definitionName: "Description"
rows:
- case: "IncomingEvent.ReceivedOrder"

- name: "milk-planning-outgoing"
termName: "Event"
definitionName: "Description"
rows:
- case: "OutgoingEvent.OrderMilk"

- name: "production-ul"
rows:
- class: "ProductionPlan"
- class: "ProductionPlanItem"
- case: "Production.ToStart"
name: "Production To Start"
- case: "Production.InProgress"
name: "Production In Progress"
- case: "Production.Ended"
name: "Ended Production"
- type: "RecipeBook"
- class: "Recipe"
- class: "QuintalsOfIngredient"
- class: "CheeseTypeRipeningDays"
- class: "RipeningDays"
- name: "production-outgoing"
termName: "Event"
definitionName: "Description"
rows:
- case: "OutgoingEvent.StartProduction"
- case: "OutgoingEvent.NewBatch"
- name: "production-incoming"
termName: "Event"
definitionName: "Description"
rows:
- case: "IncomingEvent.ProductionPlanReady"
- case: "IncomingEvent.ProductionEnded"

- name: "restocking-ul"
rows:
- type: "Stock"
- class: "StockedMilk"
- class: "StockedQuantity"
- class: "QuintalsOfIngredient"
- class: "QuintalsOfMilk"
- name: "restocking-incoming"
termName: "Event"
definitionName: "Description"
rows:
- case: "IncomingEvent.OrderMilk"
- case: "IncomingEvent.ProductionStarted"
- name: "production-planning-ul"
rows:
- class: "ProductionPlan"
- class: "ProductToProduce"
- class: "Quantity"
- class: "MissingProducts"
- class: "MissingQuantity"
- class: "Order"
- class: "OrderedProduct"
- class: "CheeseTypeRipeningDays"
- class: "RipeningDays"

- name: "production-planning-incoming"
rows:
- case: "IncomingEvent.NewOrderReceived"
- name: "production-planning-outgoing"
rows:
- case: "OutgoingEvent.ProductionPlanReady"
- case: "OutgoingEvent.OrderDelayed"

- name: "client-orders-ul"
rows:
- class: "IncomingOrder"
- class: "IncomingOrderLine"
- class: "Customer"
- class: "Location"
- class: "PriceList"
- class: "PricedOrder"
- class: "PricedOrderLine"
- class: "InProgressOrder"
- enum: "InProgressOrderLine"
- class: "CompletedOrder"
- class: "CompleteOrderLine"
- class: "TransportDocument"
- class: "TransportDocumentLine"

- name: "client-orders-incoming"
rows:
- case: "IncomingEvent.OrderReceived"
- case: "IncomingEvent.ProductPalletizedForOrder"
- case: "IncomingEvent.OrderCompleted"

- name: "client-orders-outgoing"
rows:
- case: "OutgoingEvent.OrderProcessed"

ignored: []
Loading

0 comments on commit 560ac63

Please sign in to comment.