Skip to content
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
33 changes: 33 additions & 0 deletions .github/workflows/maven-regression-tests-ENG.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Maven Regression Tests (eng.elimu.ai)

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
test_rest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
cache: maven
- run: mvn clean
- run: mvn verify -P regression-test-rest -D base.url=http://eng.elimu.ai

test_ui:
needs: test_rest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
cache: maven
- run: mvn clean
- run: mvn verify -P regression-test-ui -D base.url=http://eng.elimu.ai -D headless=true
33 changes: 33 additions & 0 deletions .github/workflows/maven-regression-tests-HIN.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Maven Regression Tests (hin.elimu.ai)

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
test_rest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
cache: maven
- run: mvn clean
- run: mvn verify -P regression-test-rest -D base.url=http://hin.elimu.ai

test_ui:
needs: test_rest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
cache: maven
- run: mvn clean
- run: mvn verify -P regression-test-ui -D base.url=http://hin.elimu.ai -D headless=true
82 changes: 0 additions & 82 deletions .github/workflows/maven-regression-tests-PROD.yml

This file was deleted.

33 changes: 33 additions & 0 deletions .github/workflows/maven-regression-tests-TGL.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Maven Regression Tests (tgl.elimu.ai)

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
test_rest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
cache: maven
- run: mvn clean
- run: mvn verify -P regression-test-rest -D base.url=http://tgl.elimu.ai

test_ui:
needs: test_rest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
cache: maven
- run: mvn clean
- run: mvn verify -P regression-test-ui -D base.url=http://tgl.elimu.ai -D headless=true
33 changes: 33 additions & 0 deletions .github/workflows/maven-regression-tests-THA.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Maven Regression Tests (tha.elimu.ai)

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
test_rest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
cache: maven
- run: mvn clean
- run: mvn verify -P regression-test-rest -D base.url=http://tha.elimu.ai

test_ui:
needs: test_rest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
cache: maven
- run: mvn clean
- run: mvn verify -P regression-test-ui -D base.url=http://tha.elimu.ai -D headless=true
2 changes: 1 addition & 1 deletion pom-dependency-tree.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ai.elimu:webapp:war:2.5.101-SNAPSHOT
ai.elimu:webapp:war:2.5.102-SNAPSHOT
+- ai.elimu:model:jar:model-2.0.97:compile
| \- com.google.code.gson:gson:jar:2.13.0:compile
| \- com.google.errorprone:error_prone_annotations:jar:2.37.0:compile
Expand Down
20 changes: 0 additions & 20 deletions src/main/java/ai/elimu/web/content/word/WordListController.java
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
package ai.elimu.web.content.word;

import ai.elimu.dao.EmojiDao;
import ai.elimu.dao.LetterSoundDao;
import ai.elimu.dao.WordDao;
import ai.elimu.entity.content.Emoji;
import ai.elimu.entity.content.LetterSound;
import ai.elimu.entity.content.Word;

import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
Expand All @@ -27,8 +24,6 @@ public class WordListController {

private final WordDao wordDao;

private final LetterSoundDao letterSoundDao;

private final EmojiDao emojiDao;

@GetMapping
Expand All @@ -39,21 +34,6 @@ public String handleRequest(Model model) {
model.addAttribute("words", words);
model.addAttribute("emojisByWordId", getEmojisByWordId());

List<LetterSound> letterSounds = letterSoundDao.readAllOrderedByUsage();
if (!letterSounds.isEmpty()) {
LetterSound mostUsedLetterSound = letterSounds.get(0);
for (Word word : words) {
log.info("word.getText(): " + word.getText());
log.info("word.getLetterSounds(): " + word.getLetterSounds());
if (word.getLetterSounds().isEmpty()) {
// Store temporary letters
word.setLetterSounds(Arrays.asList(mostUsedLetterSound, mostUsedLetterSound, mostUsedLetterSound, mostUsedLetterSound, mostUsedLetterSound, mostUsedLetterSound, mostUsedLetterSound, mostUsedLetterSound));
wordDao.update(word);
log.info("word updated: " + word.getId());
}
}
}

int maxUsageCount = 0;
for (Word word : words) {
if (word.getUsageCount() > maxUsageCount) {
Expand Down