Skip to content

Commit

Permalink
Change les warnings en erreurs sur la CI (#1139)
Browse files Browse the repository at this point in the history
  • Loading branch information
niladic committed Aug 17, 2021
1 parent 37ec20f commit badad94
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:

# We compile the tests here so the test command can run faster
- name: Compile tests
run: "sbt test:compile"
run: "sbt Test/compile"
# Due to transient errors thrown by HTMLUnit, we try
# to run the tests a few times
- name: Run tests
Expand Down
2 changes: 2 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ scalacOptions ++= Seq(
"-Xlint:eta-zero",
"-Xlint:eta-sam",
"-Xlint:deprecation",
// Sets warnings as errors on the CI
if (insideCI.value) "-Wconf:any:error" else "-Wconf:any:warning",
"-Wdead-code",
"-Wextra-implicit",
"-Wmacros:before",
Expand Down
16 changes: 8 additions & 8 deletions test/models/AuthorizationSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class AuthorizationSpec extends Specification {
val userId = randomUUID()
val rights = UserRights(Set(Helper))
val fileExpirationDate = 10
val overrun = -3
val overrun: Long = -3

val answers = List.empty[Answer]

Expand Down Expand Up @@ -70,7 +70,7 @@ class AuthorizationSpec extends Specification {
val userId = randomUUID()
val rights = UserRights(Set(Helper))
val fileExpirationDate = 10
val overrun = 10
val overrun: Long = 10

val answers = List.empty[Answer]

Expand Down Expand Up @@ -132,7 +132,7 @@ class AuthorizationSpec extends Specification {
val userId = randomUUID()
val rights = UserRights(Set(Helper))
val fileExpirationDate = 10
val overrun = -3
val overrun: Long = -3

val answer = createAnswer(applicationId, now().minusDays(fileExpirationDate + overrun))

Expand Down Expand Up @@ -165,7 +165,7 @@ class AuthorizationSpec extends Specification {
val userId = randomUUID()
val rights = UserRights(Set(Helper))
val fileExpirationDate = 10
val overrun = 2
val overrun: Long = 2

val answer = createAnswer(applicationId, now().minusDays(fileExpirationDate + overrun))

Expand Down Expand Up @@ -205,7 +205,7 @@ class AuthorizationSpec extends Specification {
val userId = randomUUID()
val rights = UserRights(Set(InstructorOfGroups(Set.empty[UUID])))
val fileExpirationDate = 10
val overrun = -3
val overrun: Long = -3

val answers = List.empty[Answer]

Expand Down Expand Up @@ -235,7 +235,7 @@ class AuthorizationSpec extends Specification {
val userId = randomUUID()
val rights = UserRights(Set(InstructorOfGroups(Set.empty[UUID])))
val fileExpirationDate = 10
val overrun = 10
val overrun: Long = 10

val answers = List.empty[Answer]

Expand Down Expand Up @@ -297,7 +297,7 @@ class AuthorizationSpec extends Specification {
val userId = randomUUID()
val rights = UserRights(Set(InstructorOfGroups(Set.empty[UUID])))
val fileExpirationDate = 10
val overrun = -3
val overrun: Long = -3

val answer = createAnswer(applicationId, now().minusDays(fileExpirationDate + overrun))

Expand Down Expand Up @@ -330,7 +330,7 @@ class AuthorizationSpec extends Specification {
val userId = randomUUID()
val rights = UserRights(Set(InstructorOfGroups(Set.empty[UUID])))
val fileExpirationDate = 10
val overrun = 2
val overrun: Long = 2

val answer = createAnswer(applicationId, now().minusDays(fileExpirationDate + overrun))

Expand Down

0 comments on commit badad94

Please sign in to comment.