Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ci)(cd): basic workflows #1

Merged
merged 1 commit into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: CI
on:
pull_request:
paths:
- .github/workflows/ci.yaml
- build.sbt
- .scalafmt.conf
- project/**
- src/**

defaults:
run:
shell: bash

env:
GITHUB_TOKEN: ${{ secrets.READ_PACKAGES }}

jobs:
code-check:
runs-on: self-hosted
container:
image: sbtscala/scala-sbt:eclipse-temurin-jammy-21.0.2_13_1.9.9_2.12.19
options: --user 1001:1001
steps:
- uses: actions/checkout@v4
- run: sbt headerCheckAll
test:
runs-on: self-hosted
container:
image: sbtscala/scala-sbt:eclipse-temurin-jammy-21.0.2_13_1.9.9_2.12.19
options: --user 1001:1001
steps:
- uses: actions/checkout@v4
- run: sbt clean test
21 changes: 21 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: publish
on:
push:
tags:
- "v*.*.*"

env:
GITHUB_TOKEN: ${{ secrets.WRITE_PACKAGES }}

jobs:
publish:
runs-on: self-hosted
container:
image: sbtscala/scala-sbt:eclipse-temurin-jammy-21.0.2_13_1.9.9_2.12.19
options: --user 1001:1001
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: sbt publish
run: sbt clean publish
136 changes: 136 additions & 0 deletions .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
version = 2.7.5
maxColumn = 120

optIn.forceBlankLineBeforeDocstring = true
trailingCommas = "never"

align {
openParenCallSite = false
openParenDefnSite = false
preset=some
stripMargin = false
tokens = []
}

assumeStandardLibraryStripMargin = true
binPack.parentConstructors = "never"

continuationIndent {
callSite = 2
ctorSite = 4
defnSite = 4
extendSite = 4
}

danglingParentheses {
ctrlSite = true
defnSite = true
}


docstrings.style = "Asterisk" // JavaDoc
includeCurlyBraceInSelectChains = true
includeNoParensInSelectChains = false

literals {
double = "Lower"
float = "Lower"
hexDigits = "Lower"
hexPrefix = "Lower"
long = "Upper"
}

newlines {
afterCurlyLambdaParams = squash
afterCurlyLambdaParams=squash
alwaysBeforeElseAfterCurlyIf = false
beforeCurlyLambdaParams = multilineWithCaseOnly
beforeMultiline = fold
beforeMultilineDef = false
implicitParamListModifierPrefer = before
}

rewrite {
redundantBraces {
generalExpressions = false
ifElseExpressions = false
methodBodies = false
parensForOneLineApply = true
stringInterpolation = true
}
rules = [
RedundantBraces,
RedundantParens,
SortModifiers,
SortImports
]
redundantBraces {
generalExpressions = false
methodBodies = false
ifElseExpressions = false
parensForOneLineApply = true
stringInterpolation = true
}
sortModifiers {
order = [
"implicit",
"final",
"sealed",
"abstract",
"override",
"private",
"protected",
"lazy"
]
}
}

continuationIndent {
callSite = 2
defnSite = 4
ctorSite = 4
extendSite = 4
}

align {
preset=some
tokens = []
openParenCallSite = false
openParenDefnSite = false
preset = some
stripMargin = false
tokens = []
}

danglingParentheses {
defnSite = true
ctrlSite = true
}

spaces {
afterKeywordBeforeParen = true
afterSymbolicDefs = false
beforeContextBoundColon = "Never"
inByNameTypes = true
inParentheses = false
neverAroundInfixTypes = []
afterKeywordBeforeParen = true
inByNameTypes = true
afterSymbolicDefs = false
}

literals {
long = "Upper"
float = "Lower"
double = "Lower"
hexPrefix = "Lower"
hexDigits = "Lower"
}

docstrings {
style = "Asterisk" // JavaDoc
}

binPack {
parentConstructors = "Never"
}