Skip to content

Commit e92d076

Browse files
authored
#348 Migrate workflows to centralized SDK version matrix and fix job outputs (#349)
* #348 Migrate workflows to centralized SDK version matrix and fix job outputs * fix: formatting and zizmor template-injection warnings
1 parent 59929fa commit e92d076

4 files changed

Lines changed: 32 additions & 7 deletions

File tree

.github/workflows/pylint.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ permissions: {}
1212

1313
jobs:
1414
pylint:
15-
outputs:
16-
status: ${{ job.status }}
1715
permissions:
1816
contents: read
1917
runs-on: ubuntu-latest
@@ -49,10 +47,10 @@ jobs:
4947
5048
slack-notification:
5149
needs: [pylint]
52-
if: ${{ always() && contains(fromJSON('["failure", "cancelled"]'), needs.pylint.outputs.status ) && github.ref_name == github.event.repository.default_branch }}
50+
if: ${{ always() && contains(fromJSON('["failure", "cancelled"]'), needs.pylint.result ) && github.ref_name == github.event.repository.default_branch }}
5351
secrets:
5452
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
5553
SLACK_CHANNEL: ${{ secrets.SLACK_CHANNEL }}
5654
uses: senzing-factory/build-resources/.github/workflows/build-failure-slack-notification.yaml@v4
5755
with:
58-
job-status: ${{ needs.pylint.outputs.status }}
56+
job-status: ${{ needs.pylint.result }}

.github/workflows/pytest-darwin.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,17 @@ env:
1818
permissions: {}
1919

2020
jobs:
21+
sdk-versions:
22+
runs-on: ubuntu-latest
23+
outputs:
24+
senzingsdk-versions: ${{ steps.cfg.outputs.senzingsdk-versions }}
25+
steps:
26+
- id: cfg
27+
uses: senzing-factory/build-resources/sdk-versions@v4
28+
2129
pytest-darwin:
2230
name: "Pytest with Senzing: ${{ matrix.senzingsdk-version }}; OS: ${{ matrix.os }}; Python ${{ matrix.python-version }}"
31+
needs: sdk-versions
2332
permissions:
2433
contents: read
2534
runs-on: ${{ matrix.os }}
@@ -28,7 +37,7 @@ jobs:
2837
matrix:
2938
os: [macos-latest]
3039
python-version: ["3.10", "3.11", "3.12", "3.13"]
31-
senzingsdk-version: [production-v4, staging-v4]
40+
senzingsdk-version: ${{ fromJSON(needs.sdk-versions.outputs.senzingsdk-versions) }}
3241
timeout-minutes: 30
3342

3443
steps:

.github/workflows/pytest-linux.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,17 @@ env:
2020
permissions: {}
2121

2222
jobs:
23+
sdk-versions:
24+
runs-on: ubuntu-latest
25+
outputs:
26+
senzingsdk-versions: ${{ steps.cfg.outputs.senzingsdk-versions }}
27+
steps:
28+
- id: cfg
29+
uses: senzing-factory/build-resources/sdk-versions@v4
30+
2331
pytest-linux:
2432
name: "Pytest with Senzing: ${{ matrix.senzingsdk-version }}; OS: ${{ matrix.os }}; Python ${{ matrix.python-version }}"
33+
needs: sdk-versions
2534
permissions:
2635
contents: read
2736
runs-on: ${{ matrix.os }}
@@ -30,7 +39,7 @@ jobs:
3039
matrix:
3140
os: [ubuntu-latest]
3241
python-version: ["3.10", "3.11", "3.12", "3.13"]
33-
senzingsdk-version: [production-v4, staging-v4]
42+
senzingsdk-version: ${{ fromJSON(needs.sdk-versions.outputs.senzingsdk-versions) }}
3443
timeout-minutes: 30
3544

3645
steps:

.github/workflows/pytest-windows.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,25 @@ env:
1818
permissions: {}
1919

2020
jobs:
21+
sdk-versions:
22+
runs-on: ubuntu-latest
23+
outputs:
24+
senzingsdk-versions: ${{ steps.cfg.outputs.senzingsdk-versions }}
25+
steps:
26+
- id: cfg
27+
uses: senzing-factory/build-resources/sdk-versions@v4
28+
2129
pytest-windows:
2230
name: "Pytest with Senzing: ${{ matrix.senzingsdk-version }}; OS: windows-latest; Python ${{ matrix.python-version }}"
31+
needs: sdk-versions
2332
permissions:
2433
contents: read
2534
runs-on: windows-latest
2635
strategy:
2736
fail-fast: false
2837
matrix:
2938
python-version: ["3.10", "3.11", "3.12", "3.13"]
30-
senzingsdk-version: [production-v4, staging-v4]
39+
senzingsdk-version: ${{ fromJSON(needs.sdk-versions.outputs.senzingsdk-versions) }}
3140
timeout-minutes: 30
3241

3342
steps:

0 commit comments

Comments
 (0)