From 617391abc3487812d668c0e1afb85f7f9b54251d Mon Sep 17 00:00:00 2001 From: Sam <109683132+kernelsam@users.noreply.github.com> Date: Fri, 23 May 2025 09:29:55 -0700 Subject: [PATCH] #281 nightly cron job for install testing --- .github/workflows/go-test-darwin.yaml | 18 +++++++++++++++++- .github/workflows/go-test-linux.yaml | 8 ++++++-- .github/workflows/go-test-windows.yaml | 18 +++++++++++++++++- 3 files changed, 40 insertions(+), 4 deletions(-) diff --git a/.github/workflows/go-test-darwin.yaml b/.github/workflows/go-test-darwin.yaml index c2245bd..03ba8cb 100644 --- a/.github/workflows/go-test-darwin.yaml +++ b/.github/workflows/go-test-darwin.yaml @@ -1,6 +1,11 @@ name: Go test darwin -on: [pull_request, workflow_dispatch] +on: + pull_request: + branches: [main] + schedule: + - cron: "15 7 * * *" + workflow_dispatch: env: SENZING_LOG_LEVEL: TRACE @@ -12,6 +17,8 @@ permissions: jobs: go-test-darwin: name: "Go test with Senzing: ${{ matrix.senzingsdk-version }}; OS: ${{ matrix.os }}; Go: ${{ matrix.go }}" + outputs: + status: ${{ job.status }} runs-on: ${{ matrix.os }} strategy: matrix: @@ -85,3 +92,12 @@ jobs: uses: senzing-factory/build-resources/.github/workflows/go-coverage.yaml@v2 with: coverage-config: ./.github/coverage/testcoverage.yaml + + slack-notification: + needs: [go-test-darwin, coverage] + if: ${{ always() && contains(fromJSON('["failure", "cancelled"]'), needs.go-test-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.go-test-darwin.outputs.status && needs.coverage.outputs.job-status }} diff --git a/.github/workflows/go-test-linux.yaml b/.github/workflows/go-test-linux.yaml index f3cffff..95d4eee 100644 --- a/.github/workflows/go-test-linux.yaml +++ b/.github/workflows/go-test-linux.yaml @@ -1,6 +1,10 @@ name: Go test linux -on: [push, workflow_dispatch] +on: + push: + schedule: + - cron: "15 7 * * *" + workflow_dispatch: env: SENZING_LOG_LEVEL: TRACE @@ -97,7 +101,7 @@ jobs: slack-notification: needs: [go-test-linux, coverage] - if: ${{ always() && contains(fromJSON('["failure", "cancelled"]'), needs.go-test-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.go-test-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/go-test-windows.yaml b/.github/workflows/go-test-windows.yaml index 31ca9fe..56f0a6d 100644 --- a/.github/workflows/go-test-windows.yaml +++ b/.github/workflows/go-test-windows.yaml @@ -1,6 +1,11 @@ name: Go test windows -on: [pull_request, workflow_dispatch] +on: + pull_request: + branches: [main] + schedule: + - cron: "15 7 * * *" + workflow_dispatch: env: SENZING_LOG_LEVEL: TRACE @@ -12,6 +17,8 @@ permissions: jobs: go-test-windows: name: "Go test with Senzing: ${{ matrix.senzingsdk-version }}; OS: windows-latest; Go: ${{ matrix.go }}" + outputs: + status: ${{ job.status }} runs-on: windows-latest strategy: matrix: @@ -80,3 +87,12 @@ jobs: uses: senzing-factory/build-resources/.github/workflows/go-coverage.yaml@v2 with: coverage-config: ./.github/coverage/testcoverage.yaml + + slack-notification: + needs: [go-test-windows, coverage] + if: ${{ always() && contains(fromJSON('["failure", "cancelled"]'), needs.go-test-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.go-test-windows.outputs.status && needs.coverage.outputs.job-status }}