name: Install Matrix permissions: contents: read on: schedule: - cron: '0 6 * * 1' # weekly, catches upstream dependency breakage between releases workflow_run: # The Release workflow publishes the GitHub release *before* it uploads to # PyPI (see release.yml), so triggering on `release: published` would race # the PyPI upload and could pass by silently installing the prior version. # workflow_run fires only after the whole Release workflow - including the # PyPI publish step - has finished. workflows: ['Release'] types: [completed] workflow_dispatch: jobs: verify-install: if: github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' name: pip install semantica (${{ matrix.os }}, py${{ matrix.python-version }}) runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] python-version: ['3.9', '3.10', '3.11', '3.12'] steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 - name: Pin expected version for release-triggered runs id: expected-version if: github.event_name == 'workflow_run' shell: bash env: EXPECTED_TAG: ${{ github.event.workflow_run.head_branch }} run: | expected="${EXPECTED_TAG#v}" if [ -z "$expected" ]; then echo "::error::Could not determine a release tag from the triggering workflow run (head_branch was empty)." exit 1 fi echo "constraint===$expected" >> "$GITHUB_OUTPUT" - id: setup-semantica uses: ./.github/actions/setup-semantica with: python-version: ${{ matrix.python-version }} cache: 'pip' version: ${{ steps.expected-version.outputs.constraint }} - name: Smoke test import shell: bash run: | python -c " import semantica print('semantica', semantica.__version__, 'installed and importable') "