Files
2026-05-24 01:12:07 +02:00

66 lines
2.2 KiB
YAML

name: Tests
on:
pull_request_target:
types: [opened, labeled, synchronize]
paths-ignore:
- "**/*.md"
- "docs/**"
- ".docs/**"
- "LICENSE"
jobs:
test:
if: '!github.event.pull_request.draft && (contains(fromJSON(''["MEMBER", "OWNER", "COLLABORATOR"]''), github.event.pull_request.author_association) || contains(github.event.pull_request.labels.*.name, ''safe-to-run''))'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
- name: Setup pnpm
uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4.3.0
with:
version: 10.30.1
- name: Setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: 24
cache: "pnpm"
- run: pnpm install
- run: pnpm check
- name: Setup Rust
run: |
if ! command -v cargo >/dev/null 2>&1; then
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs \
| sh -s -- -y --profile minimal --default-toolchain stable
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
fi
if [ -f "$HOME/.cargo/env" ]; then
. "$HOME/.cargo/env"
fi
rustup component add rustfmt clippy
- name: Check Rust
run: |
pnpm rust:fmt:check
pnpm rust:check
pnpm rust:clippy
pnpm rust:test
- name: Check fixture contracts
run: |
cargo test -p agent-ci-core fixture
cargo test -p agent-ci-runtime docker_socket_fixture_contracts_match_snapshots
pnpm fixtures:check
- name: Check native CLI golden output
run: pnpm golden:cli
- name: Check Rust smoke parity
run: |
if [ "${AGENT_CI_LOCAL:-}" = "true" ]; then
echo "Skipping nested Rust smoke parity inside agent-ci local validation."
exit 0
fi
pnpm rust:smoke:parity
- name: Test DTU
run: pnpm --filter dtu-github-actions test
- name: Test CLI
run: pnpm --filter agent-ci test