diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index a22cac7..100f94a 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -17,4 +17,41 @@ jobs: distribution: 'adopt' - name: Build with Maven - run: mvn --batch-mode --update-snapshots verify \ No newline at end of file + run: mvn --batch-mode --update-snapshots verify + lint: + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v2 + + - name: Install Node.js + uses: actions/setup-node@v4 + with: + node-version: '16' + + - name: Install Dependencies + run: | + npm install -g bpmnlint dmnlint + + - name: Run BPMN Lint + # Find all BPMN files in subdirectories and lint them + run: | + find . -type f -name '*.bpmn' -exec sh -c 'bpmnlint -c "${0%/*}/.bpmnlintrc" "$0"' {} \; + if [ $? -eq 0 ]; then + echo "BPMN linting passed" + else + echo "BPMN linting failed" + exit 1 + fi + + - name: Run DMN Lint + # Find all DMN files in subdirectories and lint them + run: | + find . -type f -name '*.dmn' -exec sh -c 'dmnlint -c "${0%/*}/.dmnlintrc" "$0"' {} \; + if [ $? -eq 0 ]; then + echo "DMN linting passed" + else + echo "DMN linting failed" + exit 1 + fi \ No newline at end of file diff --git a/order-example/order-example-camunda7/src/main/resources/.bpmnlintrc b/order-example/order-example-camunda7/src/main/resources/.bpmnlintrc new file mode 100644 index 0000000..ccd4edc --- /dev/null +++ b/order-example/order-example-camunda7/src/main/resources/.bpmnlintrc @@ -0,0 +1,3 @@ +{ + "extends": "bpmnlint:recommended" +} \ No newline at end of file diff --git a/order-example/order-example-camunda7/src/main/resources/.dmnlintrc b/order-example/order-example-camunda7/src/main/resources/.dmnlintrc new file mode 100644 index 0000000..960f5f8 --- /dev/null +++ b/order-example/order-example-camunda7/src/main/resources/.dmnlintrc @@ -0,0 +1,3 @@ +{ + "extends": "dmnlint:recommended" +} \ No newline at end of file