Skip to content

Commit 97eb40b

Browse files
committed
#55 run java and csharp snippets nightly
1 parent f7bac0a commit 97eb40b

File tree

6 files changed

+106
-10
lines changed

6 files changed

+106
-10
lines changed

.github/workflows/csharp-darwin-snippets.yaml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
11
name: csharp darwin snippets
22

3-
on: [pull_request, workflow_dispatch]
3+
on:
4+
pull_request:
5+
schedule:
6+
- cron: "15 7 * * *"
7+
workflow_dispatch:
48

59
permissions:
610
contents: read
7-
pull-requests: write
811

912
jobs:
1013
csharp-darwin-snippets:
14+
outputs:
15+
status: ${{ job.status }}
16+
permissions:
17+
contents: read
18+
pull-requests: write
1119
runs-on: macos-latest
1220
strategy:
1321
matrix:
@@ -48,3 +56,12 @@ jobs:
4856
cd "${GITHUB_WORKSPACE}"/csharp/runner
4957
dotnet add SnippetRunner package Senzing.Sdk --version 4.0.0-beta
5058
dotnet run --project SnippetRunner all
59+
60+
slack-notification:
61+
needs: [csharp-darwin-snippets]
62+
if: ${{ always() && contains(fromJSON('["failure", "cancelled"]'), needs.csharp-darwin-snippets.outputs.status ) && github.event_name == 'schedule' }}
63+
secrets:
64+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
65+
uses: senzing-factory/build-resources/.github/workflows/build-failure-slack-notification.yaml@v2
66+
with:
67+
job-status: ${{ needs.csharp-darwin-snippets.outputs.status }}

.github/workflows/csharp-linux-snippets.yaml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,19 @@ on:
55
branches-ignore: [main]
66
pull_request:
77
branches: [main]
8+
schedule:
9+
- cron: "15 7 * * *"
810

911
permissions:
1012
contents: read
11-
pull-requests: write
1213

1314
jobs:
1415
csharp-linux-snippets:
16+
outputs:
17+
status: ${{ job.status }}
18+
permissions:
19+
contents: read
20+
pull-requests: write
1521
runs-on: ubuntu-latest
1622
strategy:
1723
matrix:
@@ -49,3 +55,12 @@ jobs:
4955
cd "${GITHUB_WORKSPACE}"/csharp/runner
5056
dotnet add SnippetRunner package Senzing.Sdk --version 4.0.0-beta
5157
dotnet run --project SnippetRunner all
58+
59+
slack-notification:
60+
needs: [csharp-linux-snippets]
61+
if: ${{ always() && contains(fromJSON('["failure", "cancelled"]'), needs.csharp-linux-snippets.outputs.status ) && github.event_name == 'schedule' }}
62+
secrets:
63+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
64+
uses: senzing-factory/build-resources/.github/workflows/build-failure-slack-notification.yaml@v2
65+
with:
66+
job-status: ${{ needs.csharp-linux-snippets.outputs.status }}

.github/workflows/csharp-windows-snippets.yaml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
11
name: csharp windows snippets
22

3-
on: [pull_request, workflow_dispatch]
3+
on:
4+
pull_request:
5+
schedule:
6+
- cron: "15 7 * * *"
7+
workflow_dispatch:
48

59
permissions:
610
contents: read
7-
pull-requests: write
811

912
jobs:
1013
csharp-windows-snippets:
14+
outputs:
15+
status: ${{ job.status }}
16+
permissions:
17+
contents: read
18+
pull-requests: write
1119
runs-on: windows-latest
1220
strategy:
1321
matrix:
@@ -47,3 +55,12 @@ jobs:
4755
run: |
4856
cd ${Env:GITHUB_WORKSPACE}/csharp/runner
4957
dotnet run --project SnippetRunner all
58+
59+
slack-notification:
60+
needs: [csharp-windows-snippets]
61+
if: ${{ always() && contains(fromJSON('["failure", "cancelled"]'), needs.csharp-windows-snippets.outputs.status ) && github.event_name == 'schedule' }}
62+
secrets:
63+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
64+
uses: senzing-factory/build-resources/.github/workflows/build-failure-slack-notification.yaml@v2
65+
with:
66+
job-status: ${{ needs.csharp-windows-snippets.outputs.status }}

.github/workflows/java-darwin-snippets.yaml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
11
name: java darwin snippets
22

3-
on: [pull_request, workflow_dispatch]
3+
on:
4+
pull_request:
5+
schedule:
6+
- cron: "15 7 * * *"
7+
workflow_dispatch:
48

59
permissions:
610
contents: read
7-
pull-requests: write
811

912
jobs:
1013
java-darwin-snippets:
14+
outputs:
15+
status: ${{ job.status }}
16+
permissions:
17+
contents: read
18+
pull-requests: write
1119
runs-on: macos-latest
1220
strategy:
1321
fail-fast: false
@@ -48,3 +56,12 @@ jobs:
4856
run: |
4957
cd "${GITHUB_WORKSPACE}"/java
5058
java -jar target/sz-sdk-snippets.jar all
59+
60+
slack-notification:
61+
needs: [java-darwin-snippets]
62+
if: ${{ always() && contains(fromJSON('["failure", "cancelled"]'), needs.java-darwin-snippets.outputs.status ) && github.event_name == 'schedule' }}
63+
secrets:
64+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
65+
uses: senzing-factory/build-resources/.github/workflows/build-failure-slack-notification.yaml@v2
66+
with:
67+
job-status: ${{ needs.java-darwin-snippets.outputs.status }}

.github/workflows/java-linux-snippets.yaml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,14 @@ on:
88

99
permissions:
1010
contents: read
11-
pull-requests: write
1211

1312
jobs:
1413
java-linux-snippets:
14+
outputs:
15+
status: ${{ job.status }}
16+
permissions:
17+
contents: read
18+
pull-requests: write
1519
runs-on: ubuntu-latest
1620
strategy:
1721
fail-fast: false
@@ -50,3 +54,12 @@ jobs:
5054
run: |
5155
cd "${GITHUB_WORKSPACE}"/java
5256
java -jar target/sz-sdk-snippets.jar all
57+
58+
slack-notification:
59+
needs: [java-linux-snippets]
60+
if: ${{ always() && contains(fromJSON('["failure", "cancelled"]'), needs.java-linux-snippets.outputs.status ) && github.event_name == 'schedule' }}
61+
secrets:
62+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
63+
uses: senzing-factory/build-resources/.github/workflows/build-failure-slack-notification.yaml@v2
64+
with:
65+
job-status: ${{ needs.java-linux-snippets.outputs.status }}

.github/workflows/java-windows-snippets.yaml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
11
name: java windows snippets
22

3-
on: [pull_request, workflow_dispatch]
3+
on:
4+
pull_request:
5+
schedule:
6+
- cron: "15 7 * * *"
7+
workflow_dispatch:
48

59
permissions:
610
contents: read
7-
pull-requests: write
811

912
jobs:
1013
java-windows-snippets:
14+
outputs:
15+
status: ${{ job.status }}
16+
permissions:
17+
contents: read
18+
pull-requests: write
1119
runs-on: windows-latest
1220
strategy:
1321
fail-fast: false
@@ -45,3 +53,12 @@ jobs:
4553
run: |
4654
cd "${Env:GITHUB_WORKSPACE}/java"
4755
java -jar target/sz-sdk-snippets.jar all
56+
57+
slack-notification:
58+
needs: [java-windows-snippets]
59+
if: ${{ always() && contains(fromJSON('["failure", "cancelled"]'), needs.java-windows-snippets.outputs.status ) && github.event_name == 'schedule' }}
60+
secrets:
61+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
62+
uses: senzing-factory/build-resources/.github/workflows/build-failure-slack-notification.yaml@v2
63+
with:
64+
job-status: ${{ needs.java-windows-snippets.outputs.status }}

0 commit comments

Comments
 (0)