|
26 | 26 | - id: cfg |
27 | 27 | uses: senzing-factory/build-resources/sdk-versions@v4 |
28 | 28 |
|
| 29 | + - name: Notify Slack on failure |
| 30 | + if: (failure() || cancelled()) && (github.ref_name == github.event.repository.default_branch || github.event_name == 'schedule') |
| 31 | + uses: senzing-factory/build-resources/slack-failure-notification@v4 |
| 32 | + with: |
| 33 | + job-status: ${{ job.status }} |
| 34 | + slack-channel: ${{ secrets.SLACK_CHANNEL }} |
| 35 | + slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }} |
| 36 | + |
29 | 37 | pytest-darwin: |
30 | 38 | name: "Pytest with Senzing: ${{ matrix.senzingsdk-version }}; OS: ${{ matrix.os }}; Python ${{ matrix.python-version }}" |
31 | 39 | needs: sdk-versions |
@@ -65,10 +73,21 @@ jobs: |
65 | 73 | source ./venv/bin/activate |
66 | 74 | python -m pip install typing_extensions |
67 | 75 |
|
| 76 | + - name: Mint staging tap token |
| 77 | + if: matrix.senzingsdk-version != 'production-v4' |
| 78 | + id: staging-token |
| 79 | + uses: actions/create-github-app-token@v3.1.1 |
| 80 | + with: |
| 81 | + client-id: ${{ secrets.SENZINGSDK_STAGING_CLIENT_ID }} |
| 82 | + private-key: ${{ secrets.SENZINGSDK_STAGING_APP_KEY }} |
| 83 | + owner: senzing-factory |
| 84 | + repositories: homebrew-senzingsdk-staging |
| 85 | + |
68 | 86 | - name: Install Senzing SDK |
69 | | - uses: senzing-factory/github-action-install-senzing-sdk@v4 |
| 87 | + uses: senzing-factory/github-action-install-senzing-sdk@v5 |
70 | 88 | with: |
71 | 89 | senzingsdk-version: ${{ matrix.senzingsdk-version }} |
| 90 | + senzingsdk-token: ${{ steps.staging-token.outputs.token || github.token }} |
72 | 91 |
|
73 | 92 | - name: Set environment variables |
74 | 93 | run: | |
@@ -115,12 +134,3 @@ jobs: |
115 | 134 | contents: write |
116 | 135 | uses: senzing-factory/build-resources/.github/workflows/python-coverage-comment.yaml@v4 |
117 | 136 |
|
118 | | - slack-notification: |
119 | | - needs: [pytest-darwin] |
120 | | - if: ${{ always() && contains(fromJSON('["failure", "cancelled"]'), needs.pytest-darwin.result ) && github.event_name == 'schedule' }} |
121 | | - secrets: |
122 | | - SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} |
123 | | - SLACK_CHANNEL: ${{ secrets.SLACK_CHANNEL }} |
124 | | - uses: senzing-factory/build-resources/.github/workflows/build-failure-slack-notification.yaml@v4 |
125 | | - with: |
126 | | - job-status: ${{ needs.pytest-darwin.result }} |
|
0 commit comments