name: test RFC8927 reconstitution

on: [push]

permissions: {}

jobs:
    test-rfc8927-reconstitution:
        outputs:
            status: ${{ job.status }}
        permissions:
            contents: read
        runs-on: ubuntu-latest
        strategy:
            matrix:
                python-version: ["3.12"]

        steps:
            - uses: actions/checkout@v5
              with:
                  persist-credentials: false

            - name: set up Python ${{ matrix.python-version }}
              uses: actions/setup-python@v6
              with:
                  python-version: ${{ matrix.python-version }}

            - name: Analyze the code with test_rfcC8927_reconstitution.py
              run: ./bin/test_rfc8927_reconstitution.py

    slack-notification:
        needs: [test-rfc8927-reconstitution]
        if: ${{ always() && contains(fromJSON('["failure", "cancelled"]'), needs.test-rfc8927-reconstitution.outputs.status ) && github.ref_name == github.event.repository.default_branch }}
        secrets:
            SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
        uses: senzing-factory/build-resources/.github/workflows/build-failure-slack-notification.yaml@v3
        with:
            job-status: ${{ needs.test-rfc8927-reconstitution.outputs.status }}
