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

Change les warnings en erreurs sur la CI #1139

Merged
merged 2 commits into from
Aug 17, 2021
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
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