diff --git a/.github/workflows/lint-yaml.yml b/.github/workflows/lint-yaml.yml index 4511eed8..8b709434 100644 --- a/.github/workflows/lint-yaml.yml +++ b/.github/workflows/lint-yaml.yml @@ -4,7 +4,7 @@ jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@master + - uses: actions/checkout@v2 - name: Lint action.yml uses: ibiqlik/action-yamllint@master with: diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 59371d4f..4be03b0e 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -1,26 +1,34 @@ name: Main workflow on: [push, pull_request] jobs: - run: - name: Run + # build: + # runs-on: ${{ matrix.operating-system }} + # strategy: + # matrix: + # operating-system: [ubuntu-latest, windows-latest] + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - name: Set Node.js 12.x + # uses: actions/setup-node@v1 + # with: + # node-version: 12.x + # - name: npm install + # run: npm install + # - name: Lint + # run: npm run format-check + # - name: npm test + # run: npm test + + test: runs-on: ${{ matrix.operating-system }} strategy: matrix: operating-system: [ubuntu-latest, windows-latest] steps: - name: Checkout - uses: actions/checkout@master - - - name: Set Node.js 10.x - uses: actions/setup-node@master + uses: actions/checkout@v2 + - name: Setup java 7 + uses: ./ with: - node-version: 10.x - - - name: npm install - run: npm install - - - name: Lint - run: npm run format-check - - - name: npm test - run: npm test + java-version: 7.x \ No newline at end of file diff --git a/.gitignore b/.gitignore index e6dc0cc5..3181235b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ # Ignore node_modules, ncc is used to compile nodejs modules into a single file node_modules/ __tests__/runner/* +__tests__/sample-proj/target/ # Ignore js files that are transpiled from ts files in src/ lib/ diff --git a/__tests__/sample-proj/pom.xml b/__tests__/sample-proj/pom.xml new file mode 100644 index 00000000..343af9a0 --- /dev/null +++ b/__tests__/sample-proj/pom.xml @@ -0,0 +1,22 @@ + + 4.0.0 + com.helloworld + HelloWorld + jar + 1.0-SNAPSHOT + HelloWorld + http://maven.apache.org + + + + org.json + json + 20190722 + + + + 7 + 7 + + diff --git a/__tests__/sample-proj/src/main/java/com/helloworld/App.java b/__tests__/sample-proj/src/main/java/com/helloworld/App.java new file mode 100644 index 00000000..d304cc49 --- /dev/null +++ b/__tests__/sample-proj/src/main/java/com/helloworld/App.java @@ -0,0 +1,12 @@ +package com.helloworld; +import org.json.JSONObject; + +public class App +{ + public static void main( String[] args ) + { + JSONObject obj = new JSONObject(); + obj.put("Hello", "World!"); + System.out.println(obj.toString()); + } +}