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

Add GitHub Workflow for Java port #135

Merged
merged 1 commit into from
Jul 28, 2024
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
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
Loading