Skip to content

Commit

Permalink
Merge pull request #12771 from TEAMMATES/v9-migration
Browse files Browse the repository at this point in the history
[#12048] Merge in current v9-migration
  • Loading branch information
weiquu authored Feb 24, 2024
2 parents c507049 + 2495ecd commit df49335
Show file tree
Hide file tree
Showing 424 changed files with 64,965 additions and 3,979 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/component.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ on:
branches:
- master
- release
- v9-migration
pull_request:
branches:
- master
- release
- v9-migration
schedule:
- cron: "0 0 * * *" #end of every day
jobs:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/dev-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
pull_request:
branches:
- master
- v9-migration

jobs:
build:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/e2e-cross.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- master
- release
- v9-migration
schedule:
- cron: "0 0 * * *" # end of every day
jobs:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ on:
branches:
- master
- release
- v9-migration
pull_request:
branches:
- master
- release
- v9-migration
schedule:
- cron: "0 0 * * *" #end of every day
jobs:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/lnp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- master
- release
- v9-migration
schedule:
- cron: "0 0 * * *" # end of every day
jobs:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ src/web/dist/*
src/web/webtools/*
filestorage-dev/*
datastore-dev/datastore/*
postgres-data/

!.gitkeep

Expand Down
53 changes: 51 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ apply plugin: "pmd"
apply plugin: "com.github.spotbugs"
apply plugin: "jacoco"
apply plugin: "cz.habarta.typescript-generator"
apply plugin: "org.liquibase.gradle"

def checkstyleVersion = "10.3.2"
def pmdVersion = "6.48.0"
Expand All @@ -26,11 +27,14 @@ buildscript {
exclude group: "org.gradle"
}
classpath "com.google.guava:guava:31.1-jre"
classpath "org.liquibase:liquibase-gradle-plugin:2.1.1"
}
}

configurations {
staticAnalysis

liquibaseRuntime.extendsFrom testImplementation
}

repositories {
Expand Down Expand Up @@ -71,6 +75,8 @@ dependencies {
implementation("org.eclipse.jetty:jetty-webapp")
implementation("org.eclipse.jetty:jetty-annotations")
implementation("org.jsoup:jsoup:1.15.2")
implementation("org.hibernate.orm:hibernate-core:6.1.6.Final")
implementation("org.postgresql:postgresql:42.7.2")

testAnnotationProcessor(testng)

Expand All @@ -79,6 +85,9 @@ dependencies {
testImplementation("org.seleniumhq.selenium:selenium-java:4.3.0")
testImplementation("com.deque.html.axe-core:selenium:4.6.0")
testImplementation(testng)
testImplementation("org.testcontainers:postgresql:1.17.6")
testImplementation("org.liquibase:liquibase-core:4.19.0")
testImplementation("org.mockito:mockito-core:5.1.1")
// For supporting authorization code flow locally
testImplementation("com.google.oauth-client:google-oauth-client-jetty:1.34.1")
// For using Gmail API
Expand All @@ -91,6 +100,8 @@ dependencies {
exclude group: "org.apache.jmeter", module: "bom"
}

liquibaseRuntime("info.picocli:picocli:4.7.1")
liquibaseRuntime(sourceSets.main.output)
}

sourceSets {
Expand All @@ -109,19 +120,33 @@ sourceSets {
srcDir "src/test/java"
srcDir "src/e2e/java"
srcDir "src/lnp/java"
srcDir "src/it/java"
srcDir "src/client/java"
include "**/*.java"
}
resources {
srcDir "src/test/resources"
srcDir "src/e2e/resources"
srcDir "src/lnp/resources"
srcDir "src/it/resources"
srcDir "src/client/resources"
exclude "**/*.java"
}
}
}

liquibase {
activities {
main {
searchPath "${projectDir}"
changeLogFile "src/main/resources/db/changelog/db.changelog-root.xml"
url project.properties['liquibaseDbUrl']
username project.properties['liquibaseUsername']
password project.properties['liquibasePassword']
}
}
}

tasks.withType(cz.habarta.typescript.generator.gradle.GenerateTask) {
jsonLibrary = "jackson2"
optionalAnnotations = [
Expand Down Expand Up @@ -515,8 +540,8 @@ task lnpTests(type: Test) {
}
}

task componentTests(type: Test) {
description "Runs the full unit and integration test suite."
task unitTests(type: Test) {
description "Runs the full unit test suite."
group "Test"
useTestNG()
options.suites "src/test/resources/testng-component.xml"
Expand All @@ -533,6 +558,30 @@ task componentTests(type: Test) {
}
}

task integrationTests(type: Test) {
description "Runs the full integration test suite."
group "Test"
useTestNG()
options.suites "src/it/resources/testng-it.xml"
options.useDefaultListeners = true
ignoreFailures false
maxHeapSize = "1g"
reports.html.required = false
reports.junitXml.required = false
jvmArgs "-ea", "-Xss2m", "-Dfile.encoding=UTF-8"
afterTest afterTestClosure
afterSuite checkTestNgFailureClosure
testLogging {
events "passed"
}
}

task componentTests(type: Test) {
description "Runs the full unit and integration test suite."
group "Test"
dependsOn unitTests, integrationTests
}

task e2eTests {
description "Runs the E2E test suite and retries failed test up to ${numOfTestRetries} times."
group "Test"
Expand Down
11 changes: 11 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,14 @@ services:
context: solr
ports:
- 8983:8983
postgres:
image: postgres:15.1-alpine
restart: always
volumes:
- ./postgres-data:/var/lib/postgresql/data
ports:
- 5432:5432
environment:
POSTGRES_USER: teammates
POSTGRES_PASSWORD: teammates
POSTGRES_DB: teammates
6 changes: 6 additions & 0 deletions gradle.template.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,9 @@ org.gradle.daemon=false
# Use this property if you want to use a specific Cloud SDK installation.
# If this property is not set, the latest Cloud SDK will always be used.
# cloud.sdk.home=/Users/visenze/Documents/google-cloud-sdk

# Liquibase
liquibaseTaskPrefix=liquibase
liquibaseDbUrl=jdbc:postgresql://localhost:5432/teammates
liquibaseUsername=teammates
liquibasePassword=teammates
Loading

0 comments on commit df49335

Please sign in to comment.