From 159bfebe896ba81ae3b864840eba1bf18a78575e Mon Sep 17 00:00:00 2001 From: Sam <109683132+kernelsam@users.noreply.github.com> Date: Fri, 23 May 2025 08:28:09 -0700 Subject: [PATCH 1/4] #176 nightly cron job for install testing --- .github/workflows/pytest-darwin.yaml | 18 +++++++++++++++++- .github/workflows/pytest-linux.yaml | 9 +++++++-- .github/workflows/pytest-windows.yaml | 18 +++++++++++++++++- 3 files changed, 41 insertions(+), 4 deletions(-) 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 }} From 0b24816edf8ca402344f7f1bcd5f84c27d2f1351 Mon Sep 17 00:00:00 2001 From: Sam <109683132+kernelsam@users.noreply.github.com> Date: Fri, 23 May 2025 08:35:37 -0700 Subject: [PATCH 2/4] update jscpd config --- .github/linters/.jscpd.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/linters/.jscpd.json b/.github/linters/.jscpd.json index e466020..654c50d 100644 --- a/.github/linters/.jscpd.json +++ b/.github/linters/.jscpd.json @@ -1,3 +1,7 @@ { - "threshold": 7 + "threshold": 7, + "ignore": [ + "g2_tools/**", + "sz_tools/**" + ] } \ No newline at end of file From b67317cf8f3c17ee321fd464eaff2c2c1cf11196 Mon Sep 17 00:00:00 2001 From: Sam <109683132+kernelsam@users.noreply.github.com> Date: Fri, 23 May 2025 08:40:30 -0700 Subject: [PATCH 3/4] update jscpd config --- .github/linters/.jscpd.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/linters/.jscpd.json b/.github/linters/.jscpd.json index 654c50d..ca4ce46 100644 --- a/.github/linters/.jscpd.json +++ b/.github/linters/.jscpd.json @@ -1,7 +1,7 @@ { "threshold": 7, "ignore": [ - "g2_tools/**", - "sz_tools/**" + "**/g2_tools/**", + "**/sz_tools/**" ] } \ No newline at end of file From bc9f9ea5acafdb6f1e95dba4a5334c24077d8678 Mon Sep 17 00:00:00 2001 From: Sam <109683132+kernelsam@users.noreply.github.com> Date: Fri, 23 May 2025 08:47:56 -0700 Subject: [PATCH 4/4] update jscpd config --- .github/linters/.jscpd.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/linters/.jscpd.json b/.github/linters/.jscpd.json index ca4ce46..9c8655a 100644 --- a/.github/linters/.jscpd.json +++ b/.github/linters/.jscpd.json @@ -1,5 +1,5 @@ { - "threshold": 7, + "threshold": 14, "ignore": [ "**/g2_tools/**", "**/sz_tools/**"