Skip to content

Commit

Permalink
Merge branch 'master' into update/sbt-scalafmt-2.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sviezypan committed Nov 17, 2022
2 parents e55b45f + 34804a5 commit 1ab0ced
Show file tree
Hide file tree
Showing 37 changed files with 120 additions and 30,992 deletions.
15 changes: 14 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,22 @@ jobs:
- name: Run tests
run: sbt ++${{ matrix.scala }}! test

website:
runs-on: ubuntu-20.04
timeout-minutes: 60
steps:
- name: Checkout current branch
uses: actions/[email protected]
- name: Setup Scala and Java
uses: olafurpg/setup-scala@v13
- name: Cache scala dependencies
uses: coursier/cache-action@v6
- name: Check Document Generation
run: sbt docs/compileDocs

publish:
runs-on: ubuntu-20.04
needs: [lint, test]
needs: [lint, test, website]
if: github.event_name != 'pull_request'
steps:
- name: Checkout current branch
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/site.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# This file was autogenerated using `zio-sbt` via `sbt generateGithubWorkflow`
# task and should be included in the git repository. Please do not edit
# it manually.

name: website

on:
release:
types: [ published ]

jobs:
publish-docs:
runs-on: ubuntu-20.04
timeout-minutes: 30
steps:
- uses: actions/[email protected]
with:
fetch-depth: 0
- name: Setup Scala and Java
uses: olafurpg/setup-scala@v13
- uses: actions/setup-node@v3
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
- name: Publishing Docs to NPM Registry
run: sbt docs/publishToNpm
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,5 @@ To set up the project follow below steps:

If you want to learn more, please check out:

- [ZIO SQL Homepage](https://zio.github.io/zio-sql)
- [ZIO SQL Homepage](https://zio.dev/zio-sql)
- [ZIO SQL Discord](https://discord.gg/2ccFBr4)
5 changes: 2 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import sbtcrossproject.CrossPlugin.autoImport.crossProject
inThisBuild(
List(
organization := "dev.zio",
homepage := Some(url("https://zio.github.io/zio-sql/")),
homepage := Some(url("https://zio.dev/zio-sql/")),
licenses := List("Apache-2.0" -> url("http:https://www.apache.org/licenses/LICENSE-2.0")),
developers := List(
Developer("jdegoes", "John De Goes", "[email protected]", url("http:https://degoes.net"))
Expand Down Expand Up @@ -38,7 +38,6 @@ lazy val root = project
.aggregate(
coreJVM,
coreJS,
docs,
driver,
examples,
jdbc,
Expand Down Expand Up @@ -82,7 +81,7 @@ lazy val docs = project
scalacOptions -= "-Xfatal-warnings"
)
.dependsOn(postgres)
.enablePlugins(MdocPlugin, DocusaurusPlugin)
.enablePlugins(WebsitePlugin)

lazy val examples = project
.in(file("examples"))
Expand Down
3 changes: 3 additions & 0 deletions core/jvm/src/main/scala/zio/sql/expr.scala
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,10 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule {
object AggregationDef {
val Count = AggregationDef[Any, Long](FunctionName("count"))
val Sum = AggregationDef[Double, Double](FunctionName("sum"))
val SumInt = AggregationDef[Int, Int](FunctionName("sum"))
val SumDec = AggregationDef[BigDecimal, BigDecimal](FunctionName("sum"))
val Avg = AggregationDef[Double, Double](FunctionName("avg"))
val AvgDec = AggregationDef[BigDecimal, BigDecimal](FunctionName("avg"))
def Min[F, A, B: TypeTag](expr: Expr[F, A, B]) = AggregationDef[B, B](FunctionName("min"))(expr)
def Max[F, A, B: TypeTag](expr: Expr[F, A, B]) = AggregationDef[B, B](FunctionName("max"))(expr)
}
Expand Down
45 changes: 0 additions & 45 deletions docs/about/code_of_conduct.md

This file was deleted.

Loading

0 comments on commit 1ab0ced

Please sign in to comment.