Plan: Define maturin and PyO3 validation contracts #18
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Act Validation | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| act-validation: | |
| runs-on: ubuntu-latest | |
| env: | |
| ACT_VERSION: v0.2.84 | |
| MARKDOWNLINT_CLI2_VERSION: 0.22.1 | |
| MBAKE_VERSION: 1.4.6 | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Python | |
| uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 | |
| with: | |
| python-version: '3.13' | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5 | |
| - name: Set up Rust | |
| uses: leynos/shared-actions/.github/actions/setup-rust@455d9ed03477c0026da96c2541ca26569a74acac | |
| with: | |
| toolchain: stable | |
| - name: Install template test tools | |
| run: | | |
| act_archive=act_Linux_x86_64.tar.gz | |
| act_url="https://github.com/nektos/act/releases/download/${ACT_VERSION}/${act_archive}" | |
| curl -fsSLo "${act_archive}" "${act_url}" | |
| act_sha256="$( | |
| curl -fsSL "https://api.github.com/repos/nektos/act/releases/tags/${ACT_VERSION}" | | |
| python -c 'import json, sys; release = json.load(sys.stdin); print(next(asset["digest"].split(":", 1)[1] for asset in release["assets"] if asset["name"] == "act_Linux_x86_64.tar.gz"))' | |
| )" | |
| printf '%s %s\n' "${act_sha256}" "${act_archive}" | sha256sum -c - | |
| sudo tar -xzf "${act_archive}" -C /usr/local/bin act | |
| npm install -g "markdownlint-cli2@${MARKDOWNLINT_CLI2_VERSION}" | |
| uv tool install "mbake==${MBAKE_VERSION}" | |
| - name: Check Docker runtime | |
| run: docker info | |
| - name: Run template tests with act validation | |
| env: | |
| ACT_GITHUB_TOKEN: ${{ github.token }} | |
| run: make test WITH_ACT=1 |