Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/linters/.yaml-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
extends: default

rules:
document-start: disable
comments:
min-spaces-from-content: 1
comments-indentation: disable
line-length:
level: warning
Expand Down
2 changes: 2 additions & 0 deletions .github/linters/zizmor.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
rules:
secrets-outside-env:
disable: true
unpinned-uses:
config:
policies:
Expand Down
10 changes: 1 addition & 9 deletions .github/workflows/add-labels-standardized.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,6 @@ jobs:
secrets:
ORG_MEMBERSHIP_TOKEN: ${{ secrets.ORG_MEMBERSHIP_TOKEN }}
MEMBERS: ${{ secrets.SENZING_MEMBERS }}
uses: senzing-factory/build-resources/.github/workflows/add-labels-to-issue.yaml@v4

slack-notification:
needs: [add-issue-labels]
if: ${{ always() && contains(fromJSON('["failure", "cancelled"]'), needs.add-issue-labels.result) }}
secrets:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
SLACK_CHANNEL: ${{ secrets.SLACK_CHANNEL }}
uses: senzing-factory/build-resources/.github/workflows/build-failure-slack-notification.yaml@v4
with:
job-status: ${{ needs.add-issue-labels.result }}
uses: senzing-factory/build-resources/.github/workflows/add-labels-to-issue.yaml@v4
12 changes: 2 additions & 10 deletions .github/workflows/add-to-project-garage-dependabot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,8 @@ jobs:
repository-projects: write
secrets:
PROJECT_RW_TOKEN: ${{ secrets.SENZING_GITHUB_PROJECT_RW_TOKEN }}
uses: senzing-factory/build-resources/.github/workflows/add-to-project-dependabot.yaml@v4
with:
project: ${{ vars.SENZING_PROJECT_GARAGE }}

slack-notification:
needs: [add-to-project-dependabot]
if: ${{ always() && contains(fromJSON('["failure", "cancelled"]'), needs.add-to-project-dependabot.result) }}
secrets:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
SLACK_CHANNEL: ${{ secrets.SLACK_CHANNEL }}
uses: senzing-factory/build-resources/.github/workflows/build-failure-slack-notification.yaml@v4
uses: senzing-factory/build-resources/.github/workflows/add-to-project-dependabot.yaml@v4
with:
job-status: ${{ needs.add-to-project-dependabot.result }}
project: ${{ vars.SENZING_PROJECT_GARAGE }}
12 changes: 2 additions & 10 deletions .github/workflows/add-to-project-garage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,9 @@ jobs:
repository-projects: write
secrets:
PROJECT_RW_TOKEN: ${{ secrets.SENZING_GITHUB_PROJECT_RW_TOKEN }}
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
SLACK_CHANNEL: ${{ secrets.SLACK_CHANNEL }}
uses: senzing-factory/build-resources/.github/workflows/add-to-project.yaml@v4
with:
project-number: ${{ vars.SENZING_PROJECT_GARAGE }}
org: ${{ vars.SENZING_GITHUB_ACCOUNT_NAME }}

slack-notification:
needs: [add-to-project]
if: ${{ always() && contains(fromJSON('["failure", "cancelled"]'), needs.add-to-project.result) }}
secrets:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
SLACK_CHANNEL: ${{ secrets.SLACK_CHANNEL }}
uses: senzing-factory/build-resources/.github/workflows/build-failure-slack-notification.yaml@v4
with:
job-status: ${{ needs.add-to-project.result }}
20 changes: 11 additions & 9 deletions .github/workflows/build-distribution.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: Build distribution

on: [push]

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }}
cancel-in-progress: true

permissions:
contents: read

Expand Down Expand Up @@ -47,12 +51,10 @@ jobs:
name: python-package-distributions
path: dist/

slack-notification:
needs: [build-distribution]
if: ${{ always() && contains(fromJSON('["failure", "cancelled"]'), needs.build-distribution.result ) && github.ref_name == github.event.repository.default_branch }}
secrets:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
SLACK_CHANNEL: ${{ secrets.SLACK_CHANNEL }}
uses: senzing-factory/build-resources/.github/workflows/build-failure-slack-notification.yaml@v4
with:
job-status: ${{ needs.build-distribution.result }}
- name: Notify Slack on failure
if: (failure() || cancelled()) && github.ref_name == github.event.repository.default_branch
uses: senzing-factory/build-resources/slack-failure-notification@v4
with:
job-status: ${{ job.status }}
slack-channel: ${{ secrets.SLACK_CHANNEL }}
slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
16 changes: 7 additions & 9 deletions .github/workflows/create-sphinx-documentation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,10 @@ jobs:
publish_dir: _build/
force_orphan: true

slack-notification:
needs: [docs]
if: ${{ always() && contains(fromJSON('["failure", "cancelled"]'), needs.docs.result ) }}
secrets:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
SLACK_CHANNEL: ${{ secrets.SLACK_CHANNEL }}
uses: senzing-factory/build-resources/.github/workflows/build-failure-slack-notification.yaml@v4
with:
job-status: ${{ needs.docs.result }}
- name: Notify Slack on failure
if: failure() || cancelled()
uses: senzing-factory/build-resources/slack-failure-notification@v4
with:
job-status: ${{ job.status }}
slack-channel: ${{ secrets.SLACK_CHANNEL }}
slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
4 changes: 0 additions & 4 deletions .github/workflows/dependabot-approve-and-merge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ on:
pull_request:
branches: [main]

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }}
cancel-in-progress: true

permissions: {}

jobs:
Expand Down
17 changes: 10 additions & 7 deletions .github/workflows/publish-to-pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,13 @@ jobs:

slack-notification:
needs: [build-distribution, publish-to-pypi, github-release]
if: ${{ always() && contains(fromJSON('["failure", "cancelled"]'), needs.build-distribution.result ) && contains(fromJSON('["failure", "cancelled"]'), needs.publish-to-pypi.result ) && contains(fromJSON('["failure", "cancelled"]'), needs.github-release.result ) && github.ref_name == github.event.repository.default_branch }}
secrets:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
SLACK_CHANNEL: ${{ secrets.SLACK_CHANNEL }}
uses: senzing-factory/build-resources/.github/workflows/build-failure-slack-notification.yaml@v4
with:
job-status: ${{ needs.build-distribution.result && needs.publish-to-pypi.result && needs.github-release.result }}
if: always() && (failure() || cancelled())
permissions: {}
runs-on: ubuntu-latest
steps:
- name: Notify Slack on failure
uses: senzing-factory/build-resources/slack-failure-notification@v4
with:
job-status: failure
slack-channel: ${{ secrets.SLACK_CHANNEL }}
slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
17 changes: 8 additions & 9 deletions .github/workflows/pylint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,11 @@ jobs:
# shellcheck disable=SC2046
pylint $(git ls-files '*.py' ':!:docs/source/*')

slack-notification:
needs: [pylint]
if: ${{ always() && contains(fromJSON('["failure", "cancelled"]'), needs.pylint.result ) && github.ref_name == github.event.repository.default_branch }}
secrets:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
SLACK_CHANNEL: ${{ secrets.SLACK_CHANNEL }}
uses: senzing-factory/build-resources/.github/workflows/build-failure-slack-notification.yaml@v4
with:
job-status: ${{ needs.pylint.result }}
- name: Notify Slack on failure
if: (failure() || cancelled()) && github.ref_name == github.event.repository.default_branch
uses: senzing-factory/build-resources/slack-failure-notification@v4
with:
job-status: ${{ job.status }}
slack-channel: ${{ secrets.SLACK_CHANNEL }}
slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
additional-info: "Python: ${{ matrix.python-version }}"
32 changes: 21 additions & 11 deletions .github/workflows/pytest-darwin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,22 @@ jobs:
source ./venv/bin/activate
python -m pip install typing_extensions

- name: Mint staging tap token
if: matrix.senzingsdk-version != 'production-v4'
id: staging-token
uses: actions/create-github-app-token@v3.1.1
with:
client-id: ${{ secrets.SENZINGSDK_STAGING_CLIENT_ID }}
private-key: ${{ secrets.SENZINGSDK_STAGING_APP_KEY }}
owner: senzing-factory # zizmor: ignore[github-app]
repositories: homebrew-senzingsdk-staging
permission-contents: read

- name: Install Senzing SDK
uses: senzing-factory/github-action-install-senzing-sdk@v4
uses: senzing-factory/github-action-install-senzing-sdk@v5
with:
senzingsdk-version: ${{ matrix.senzingsdk-version }}
senzingsdk-token: ${{ steps.staging-token.outputs.token || github.token }}

- name: Set environment variables
run: |
Expand Down Expand Up @@ -106,6 +118,14 @@ jobs:
name: "coverage-${{ matrix.python-version }}-${{ matrix.senzingsdk-version }}"
path: "coverage.${{ matrix.python-version }}-${{ matrix.senzingsdk-version }}"

- name: Notify Slack on failure
if: (failure() || cancelled()) && (github.ref_name == github.event.repository.default_branch || github.event_name == 'schedule')
uses: senzing-factory/build-resources/slack-failure-notification@v4
with:
job-status: ${{ job.status }}
slack-channel: ${{ secrets.SLACK_CHANNEL }}
slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }}

coverage:
if: github.event_name == 'pull_request'
name: Coverage
Expand All @@ -114,13 +134,3 @@ jobs:
pull-requests: write
contents: write
uses: senzing-factory/build-resources/.github/workflows/python-coverage-comment.yaml@v4

slack-notification:
needs: [pytest-darwin]
if: ${{ always() && contains(fromJSON('["failure", "cancelled"]'), needs.pytest-darwin.result ) && github.event_name == 'schedule' }}
secrets:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
SLACK_CHANNEL: ${{ secrets.SLACK_CHANNEL }}
uses: senzing-factory/build-resources/.github/workflows/build-failure-slack-notification.yaml@v4
with:
job-status: ${{ needs.pytest-darwin.result }}
20 changes: 9 additions & 11 deletions .github/workflows/pytest-linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:
python -m pip install typing_extensions

- name: Install Senzing SDK
uses: senzing-factory/github-action-install-senzing-sdk@v4
uses: senzing-factory/github-action-install-senzing-sdk@v5
with:
senzingsdk-version: ${{ matrix.senzingsdk-version }}

Expand Down Expand Up @@ -153,6 +153,14 @@ jobs:
name: "coverage-${{ matrix.python-version }}-${{ matrix.senzingsdk-version }}"
path: "coverage.${{ matrix.python-version }}-${{ matrix.senzingsdk-version }}"

- name: Notify Slack on failure
if: (failure() || cancelled()) && (github.ref_name == github.event.repository.default_branch || github.event_name == 'schedule')
uses: senzing-factory/build-resources/slack-failure-notification@v4
with:
job-status: ${{ job.status }}
slack-channel: ${{ secrets.SLACK_CHANNEL }}
slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }}

coverage:
if: github.event_name == 'pull_request'
name: Coverage
Expand All @@ -161,13 +169,3 @@ jobs:
pull-requests: write
contents: write
uses: senzing-factory/build-resources/.github/workflows/python-coverage-comment.yaml@v4

slack-notification:
needs: [pytest-linux]
if: ${{ always() && contains(fromJSON('["failure", "cancelled"]'), needs.pytest-linux.result ) && (github.ref_name == github.event.repository.default_branch || github.event_name == 'schedule') }}
secrets:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
SLACK_CHANNEL: ${{ secrets.SLACK_CHANNEL }}
uses: senzing-factory/build-resources/.github/workflows/build-failure-slack-notification.yaml@v4
with:
job-status: ${{ needs.pytest-linux.result }}
32 changes: 21 additions & 11 deletions .github/workflows/pytest-windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,22 @@ jobs:
.\\venv\\Scripts\\activate
python -m pip install typing_extensions

- name: Mint staging bucket token
if: matrix.senzingsdk-version != 'production-v4'
id: staging-token
uses: actions/create-github-app-token@v3.1.1
with:
client-id: ${{ secrets.SENZINGSDK_STAGING_CLIENT_ID }}
private-key: ${{ secrets.SENZINGSDK_STAGING_APP_KEY }}
owner: senzing-factory # zizmor: ignore[github-app]
repositories: scoop-senzingsdk-staging
permission-contents: read

- name: Install Senzing SDK
uses: senzing-factory/github-action-install-senzing-sdk@v4
uses: senzing-factory/github-action-install-senzing-sdk@v5
with:
senzingsdk-version: ${{ matrix.senzingsdk-version }}
senzingsdk-token: ${{ steps.staging-token.outputs.token || github.token }}

- name: Set environment variables
run: |
Expand Down Expand Up @@ -99,6 +111,14 @@ jobs:
name: "coverage-${{ matrix.python-version }}-${{ matrix.senzingsdk-version }}"
path: "coverage.${{ matrix.python-version }}-${{ matrix.senzingsdk-version }}"

- name: Notify Slack on failure
if: (failure() || cancelled()) && (github.ref_name == github.event.repository.default_branch || github.event_name == 'schedule')
uses: senzing-factory/build-resources/slack-failure-notification@v4
with:
job-status: ${{ job.status }}
slack-channel: ${{ secrets.SLACK_CHANNEL }}
slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }}

coverage:
if: github.event_name == 'pull_request'
name: Coverage
Expand All @@ -107,13 +127,3 @@ jobs:
pull-requests: write
contents: write
uses: senzing-factory/build-resources/.github/workflows/python-coverage-comment.yaml@v4

slack-notification:
needs: [pytest-windows]
if: ${{ always() && contains(fromJSON('["failure", "cancelled"]'), needs.pytest-windows.result ) && github.event_name == 'schedule' }}
secrets:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
SLACK_CHANNEL: ${{ secrets.SLACK_CHANNEL }}
uses: senzing-factory/build-resources/.github/workflows/build-failure-slack-notification.yaml@v4
with:
job-status: ${{ needs.pytest-windows.result }}
Loading