Skip to content

chore(deps-dev): update hypothesis requirement (#3062) #306

chore(deps-dev): update hypothesis requirement (#3062)

chore(deps-dev): update hypothesis requirement (#3062) #306

# DO NOT EDIT. Generated by scripts/ci/generate_workflows.py.
# Source: .github/ci/workflows.toml and .github/ci/actions.toml.
# Regenerate: python3 scripts/ci/generate_workflows.py --write
# Check drift: python3 scripts/ci/generate_workflows.py --check
name: policy-engine-ci
on:
push:
branches:
- main
pull_request:
paths:
- 'policy-engine/**'
- '.github/ci/**'
- '.github/workflows/policy-engine-ci.yml'
- 'scripts/ci/generate_workflows.py'
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
rust:
name: Rust core and SDK
runs-on: ubuntu-latest
timeout-minutes: 30
defaults:
run:
working-directory: policy-engine
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
with:
toolchain: stable
components: rustfmt, clippy
- name: Install OPA
run: |
curl --proto '=https' --tlsv1.2 -fSLo "$RUNNER_TEMP/opa" --retry 5 --retry-all-errors --retry-delay 5 --connect-timeout 20 "https://openpolicyagent.org/downloads/v0.70.0/opa_linux_amd64_static"
echo "00d114b94fdb1606a48cccdfc73c9ccdc62c38721150131ae578d5ff3df5c084 $RUNNER_TEMP/opa" | sha256sum -c -
chmod +x "$RUNNER_TEMP/opa"
echo "$RUNNER_TEMP" >> "$GITHUB_PATH"
"$RUNNER_TEMP/opa" version
- name: Format
run: |
cargo fmt --all -- --check
- name: Clippy
run: |
cargo clippy --workspace --all-targets -- -D warnings
- name: Test
run: |
cargo test --workspace
- name: Package publishable ACS crates
run: |
cargo package -p agent_control_specification_core --allow-dirty
python:
name: Python SDK and generator
runs-on: ubuntu-latest
timeout-minutes: 30
defaults:
run:
working-directory: policy-engine
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.12'
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
with:
toolchain: stable
components: rustfmt, clippy
- name: Install OPA
run: |
curl --proto '=https' --tlsv1.2 -fSLo "$RUNNER_TEMP/opa" --retry 5 --retry-all-errors --retry-delay 5 --connect-timeout 20 "https://openpolicyagent.org/downloads/v0.70.0/opa_linux_amd64_static"
echo "00d114b94fdb1606a48cccdfc73c9ccdc62c38721150131ae578d5ff3df5c084 $RUNNER_TEMP/opa" | sha256sum -c -
chmod +x "$RUNNER_TEMP/opa"
echo "ACS_OPA_PATH=$RUNNER_TEMP/opa" >> "$GITHUB_ENV"
echo "$RUNNER_TEMP" >> "$GITHUB_PATH"
"$RUNNER_TEMP/opa" version
- name: Install and test
run: |
python -m pip install --upgrade pip==24.3.1
pip install maturin==1.8.7 # Scorecard: version-pinned
pip install build==1.2.1 # Scorecard: version-pinned
pip install setuptools==80.9.0 # Scorecard: version-pinned
pip install --no-build-isolation ./sdk/python
pip install ./generator pytest==9.0.3
pytest sdk/python generator
- name: Package Python SDK
run: |
bash ../scripts/ci/build_acs_python_wheel.sh ..
- name: Package ACS generator
run: |
python -m build --no-isolation ./generator
node:
name: Node SDK
runs-on: ubuntu-latest
timeout-minutes: 30
defaults:
run:
working-directory: policy-engine/sdk/node
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Set up Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: '20'
- name: Install OPA
run: |
curl --proto '=https' --tlsv1.2 -fSLo "$RUNNER_TEMP/opa" --retry 5 --retry-all-errors --retry-delay 5 --connect-timeout 20 "https://openpolicyagent.org/downloads/v0.70.0/opa_linux_amd64_static"
echo "00d114b94fdb1606a48cccdfc73c9ccdc62c38721150131ae578d5ff3df5c084 $RUNNER_TEMP/opa" | sha256sum -c -
chmod +x "$RUNNER_TEMP/opa"
echo "ACS_OPA_PATH=$RUNNER_TEMP/opa" >> "$GITHUB_ENV"
"$RUNNER_TEMP/opa" version
- name: Install and test
run: |
npm ci
npm test
- name: Package Node SDK
run: |
mkdir -p "$RUNNER_TEMP/acs-node-pack"
npm pack --pack-destination "$RUNNER_TEMP/acs-node-pack"
node scripts/package-native.mjs --package agent-control-specification-linux-x64-gnu --binary dist/agent-control-specification.linux-x64-gnu.node --pack-destination "$RUNNER_TEMP/acs-node-pack"
tar -tzf "$RUNNER_TEMP"/acs-node-pack/agent-control-specification-0.3.1-beta.0.tgz | grep -E '^package/dist/native\.js$'
tar -tzf "$RUNNER_TEMP"/acs-node-pack/agent-control-specification-linux-x64-gnu-0.3.1-beta.0.tgz | grep -E '^package/agent-control-specification\.linux-x64-gnu\.node$'
dotnet:
name: dotnet SDK
runs-on: ubuntu-latest
timeout-minutes: 30
defaults:
run:
working-directory: policy-engine/sdk/dotnet
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Set up .NET
uses: actions/setup-dotnet@9a946fdbd5fb07b82b2f5a4466058b876ab72bb2 # v5.3.0
with:
dotnet-version: '8.0.x'
- name: Install OPA
run: |
curl --proto '=https' --tlsv1.2 -fSLo "$RUNNER_TEMP/opa" --retry 5 --retry-all-errors --retry-delay 5 --connect-timeout 20 "https://openpolicyagent.org/downloads/v0.70.0/opa_linux_amd64_static"
echo "00d114b94fdb1606a48cccdfc73c9ccdc62c38721150131ae578d5ff3df5c084 $RUNNER_TEMP/opa" | sha256sum -c -
chmod +x "$RUNNER_TEMP/opa"
echo "ACS_OPA_PATH=$RUNNER_TEMP/opa" >> "$GITHUB_ENV"
"$RUNNER_TEMP/opa" version
- name: Build and test
run: |
dotnet build AgentControlSpecification.sln --configuration Release
dotnet run --project tests/AgentControlSpecification.Tests --configuration Release --no-build
- name: Package .NET SDK smoke
run: |
mkdir -p "$RUNNER_TEMP/acs-dotnet-pack"
dotnet pack src/AgentControlSpecification/AgentControlSpecification.csproj --configuration Release --no-build -p:AgentControlSpecificationAllowIncompleteNativePack=true --output "$RUNNER_TEMP/acs-dotnet-pack"
dotnet pack src/AgentControlSpecification.AI/AgentControlSpecification.AI.csproj --configuration Release --no-build --output "$RUNNER_TEMP/acs-dotnet-pack"
dotnet pack src/AgentControlSpecification.AgentFramework/AgentControlSpecification.AgentFramework.csproj --configuration Release --no-build --output "$RUNNER_TEMP/acs-dotnet-pack"
dotnet pack src/AgentControlSpecification.AutoGen/AgentControlSpecification.AutoGen.csproj --configuration Release --no-build --output "$RUNNER_TEMP/acs-dotnet-pack"
dotnet pack src/AgentControlSpecification.SemanticKernel/AgentControlSpecification.SemanticKernel.csproj --configuration Release --no-build --output "$RUNNER_TEMP/acs-dotnet-pack"
ls -la "$RUNNER_TEMP/acs-dotnet-pack"