diff --git a/.github/linters/.jscpd.json b/.github/linters/.jscpd.json index e466020..9c8655a 100644 --- a/.github/linters/.jscpd.json +++ b/.github/linters/.jscpd.json @@ -1,3 +1,7 @@ { - "threshold": 7 + "threshold": 14, + "ignore": [ + "**/g2_tools/**", + "**/sz_tools/**" + ] } \ No newline at end of file diff --git a/.github/workflows/pytest-darwin.yaml b/.github/workflows/pytest-darwin.yaml index 3c15fe9..b38e6b8 100644 --- a/.github/workflows/pytest-darwin.yaml +++ b/.github/workflows/pytest-darwin.yaml @@ -1,6 +1,11 @@ name: pytest darwin -on: [pull_request, workflow_dispatch] +on: + pull_request: + branches: [main] + schedule: + - cron: "15 7 * * *" + workflow_dispatch: env: DYLD_LIBRARY_PATH: /opt/senzing/er/lib:/opt/senzing/er/lib/macos @@ -13,6 +18,8 @@ permissions: jobs: pytest-darwin: name: "pytest Senzing: ${{ matrix.senzingsdk-version }}; OS: ${{ matrix.os }}; Python ${{ matrix.python-version }}" + outputs: + status: ${{ job.status }} runs-on: ${{ matrix.os }} strategy: fail-fast: false @@ -86,3 +93,12 @@ jobs: pull-requests: write contents: write uses: senzing-factory/build-resources/.github/workflows/python-coverage-comment.yaml@v2 + + slack-notification: + needs: [pytest-darwin, coverage] + if: ${{ always() && contains(fromJSON('["failure", "cancelled"]'), needs.pytest-darwin.outputs.status ) && contains(fromJSON('["failure", "cancelled"]'), needs.coverage.outputs.job-status ) && github.event_name == 'schedule' }} + secrets: + SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} + uses: senzing-factory/build-resources/.github/workflows/build-failure-slack-notification.yaml@v2 + with: + job-status: ${{ needs.pytest-darwin.outputs.status && needs.coverage.outputs.job-status }} diff --git a/.github/workflows/pytest-linux.yaml b/.github/workflows/pytest-linux.yaml index 9cbb65c..38bf38b 100644 --- a/.github/workflows/pytest-linux.yaml +++ b/.github/workflows/pytest-linux.yaml @@ -1,6 +1,11 @@ name: pytest linux -on: [push, pull_request] +on: + push: + pull_request: + branches: [main] + schedule: + - cron: "15 7 * * *" env: LD_LIBRARY_PATH: /opt/senzing/er/lib @@ -89,7 +94,7 @@ jobs: slack-notification: needs: [pytest-linux, coverage] - if: ${{ always() && contains(fromJSON('["failure", "cancelled"]'), needs.pytest-linux.outputs.status ) && contains(fromJSON('["failure", "cancelled"]'), needs.coverage.outputs.job-status ) && github.ref_name == github.event.repository.default_branch }} + if: ${{ always() && contains(fromJSON('["failure", "cancelled"]'), needs.pytest-linux.outputs.status ) && contains(fromJSON('["failure", "cancelled"]'), needs.coverage.outputs.job-status ) && (github.ref_name == github.event.repository.default_branch || github.event_name == 'schedule') }} secrets: SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} uses: senzing-factory/build-resources/.github/workflows/build-failure-slack-notification.yaml@v2 diff --git a/.github/workflows/pytest-windows.yaml b/.github/workflows/pytest-windows.yaml index 7cba0c0..17b7733 100644 --- a/.github/workflows/pytest-windows.yaml +++ b/.github/workflows/pytest-windows.yaml @@ -1,6 +1,11 @@ name: pytest windows -on: [pull_request, workflow_dispatch] +on: + pull_request: + branches: [main] + schedule: + - cron: "15 7 * * *" + workflow_dispatch: env: LD_LIBRARY_PATH: 'C:\Program Files\Senzing\er\lib' @@ -13,6 +18,8 @@ permissions: jobs: pytest-windows: name: "pytest Senzing: ${{ matrix.senzingsdk-version }}; OS: ${{ matrix.os }}; Python ${{ matrix.python-version }}" + outputs: + status: ${{ job.status }} runs-on: ${{ matrix.os }} strategy: fail-fast: false @@ -86,3 +93,12 @@ jobs: pull-requests: write contents: write uses: senzing-factory/build-resources/.github/workflows/python-coverage-comment.yaml@v2 + + slack-notification: + needs: [pytest-windows, coverage] + if: ${{ always() && contains(fromJSON('["failure", "cancelled"]'), needs.pytest-windows.outputs.status ) && contains(fromJSON('["failure", "cancelled"]'), needs.coverage.outputs.job-status ) && github.event_name == 'schedule' }} + secrets: + SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} + uses: senzing-factory/build-resources/.github/workflows/build-failure-slack-notification.yaml@v2 + with: + job-status: ${{ needs.pytest-windows.outputs.status && needs.coverage.outputs.job-status }}