Full code coverage and PR builds.
Some checks failed
/ Build and Test Library Snapshot (pull_request) Failing after 2m36s
Some checks failed
/ Build and Test Library Snapshot (pull_request) Failing after 2m36s
This commit is contained in:
parent
3c6a8a5dfd
commit
d676f8a0ae
4 changed files with 36 additions and 14 deletions
|
@ -1,12 +0,0 @@
|
||||||
on: [push]
|
|
||||||
jobs:
|
|
||||||
test:
|
|
||||||
runs-on: docker
|
|
||||||
container:
|
|
||||||
image: registry.garrity.co:8443/gs/ci-scala:latest
|
|
||||||
env:
|
|
||||||
GS_MAVEN_USER: ${{ vars.GS_MAVEN_USER }}
|
|
||||||
GS_MAVEN_TOKEN: ${{ vars.GS_MAVEN_TOKEN }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- run: sbt test
|
|
24
.forgejo/workflows/pull_request.yaml
Normal file
24
.forgejo/workflows/pull_request.yaml
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
types: [opened, synchronize, reopened]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
library_snapshot:
|
||||||
|
runs-on: docker
|
||||||
|
container:
|
||||||
|
image: registry.garrity.co:8443/gs/ci-scala:latest
|
||||||
|
name: 'Build and Test Library Snapshot'
|
||||||
|
env:
|
||||||
|
GS_MAVEN_USER: ${{ vars.GS_MAVEN_USER }}
|
||||||
|
GS_MAVEN_TOKEN: ${{ vars.GS_MAVEN_TOKEN }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
name: 'Checkout ${{ env.GITHUB_HEAD_REF }}'
|
||||||
|
- name: 'Pre-Commit'
|
||||||
|
run: |
|
||||||
|
pre-commit install
|
||||||
|
pre-commit run --all-files
|
||||||
|
- name: 'Unit Tests and Code Coverage'
|
||||||
|
run: sbt clean coverage test coverageReport
|
||||||
|
- name: 'Publish Snapshot'
|
||||||
|
run: sbt clean publish
|
|
@ -5,8 +5,11 @@ ThisBuild / versionScheme := Some("semver-spec")
|
||||||
ThisBuild / gsProjectName := "gs-uuid"
|
ThisBuild / gsProjectName := "gs-uuid"
|
||||||
|
|
||||||
val sharedSettings = Seq(
|
val sharedSettings = Seq(
|
||||||
scalaVersion := scala3,
|
scalaVersion := scala3,
|
||||||
version := semVerSelected.value
|
version := semVerSelected.value,
|
||||||
|
coverageFailOnMinimum := true,
|
||||||
|
coverageMinimumStmtTotal := 100,
|
||||||
|
coverageMinimumBranchTotal := 100
|
||||||
)
|
)
|
||||||
|
|
||||||
lazy val testSettings = Seq(
|
lazy val testSettings = Seq(
|
||||||
|
|
|
@ -50,6 +50,13 @@ class UUIDTests extends munit.FunSuite:
|
||||||
assert(parsed == Some(base))
|
assert(parsed == Some(base))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
test("should return lsb, msb, and if the UUID is zero") {
|
||||||
|
val uuid = UUID.parse("00000000-0000-0000-0000-000000000000")
|
||||||
|
assert(uuid.map(_.lsb()) == Some(0L))
|
||||||
|
assert(uuid.map(_.msb()) == Some(0L))
|
||||||
|
assert(uuid.map(_.isZero()) == Some(true))
|
||||||
|
}
|
||||||
|
|
||||||
private def doGen(
|
private def doGen(
|
||||||
using
|
using
|
||||||
UUID.Generator
|
UUID.Generator
|
||||||
|
|
Loading…
Add table
Reference in a new issue