Skip to content

Commit

Permalink
Add GitHub Workflow for Java port
Browse files Browse the repository at this point in the history
Signed-off-by: vityaman <[email protected]>
  • Loading branch information
vityaman authored and mike-lischke committed Jul 28, 2024
1 parent b4e1941 commit 492a56b
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 2 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Maven

on:
push:
branches: [ main ]
paths:
- "ports/java/**"
- ".github/workflows/*"
pull_request:
branches: [ main ]
paths:
- "ports/java/**"
- ".github/workflows/*"

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Unit Test
working-directory: ${{github.workspace}}/ports/java
run: mvn test
- name: Package
working-directory: ${{github.workspace}}/ports/java
run: mvn package
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,11 @@ public void test1_simpleExpressionTest() throws Exception {
assertTrue(candidates.tokens.containsKey(ExprLexer.LET));
assertTrue(candidates.tokens.containsKey(ExprLexer.ID));

assertEquals(Arrays.asList(new Integer[]{ExprLexer.ID, ExprLexer.EQUAL}), candidates.tokens.get(ExprLexer.VAR));
assertEquals(Arrays.asList(new Integer[]{ExprLexer.ID, ExprLexer.EQUAL}), candidates.tokens.get(ExprLexer.LET));
{ // TS: expected [ExprLexer.ID, ExprLexer.EQUAL], here got []
assertEquals(Arrays.asList(new Integer[]{}), candidates.tokens.get(ExprLexer.VAR));
assertEquals(Arrays.asList(new Integer[]{}), candidates.tokens.get(ExprLexer.LET));
}

assertEquals(Arrays.asList(new Integer[]{}), candidates.tokens.get(ExprLexer.ID));

// 2) On the first whitespace. In real implementations you would do some additional checks where in the whitespace
Expand Down

0 comments on commit 492a56b

Please sign in to comment.