Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions .github/workflows/cedar-plugin-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# ===============================================================
# Cedar Policy Plugin — Lint & Tests
# ===============================================================
#
# Runs ruff and the pytest suite for the external Cedar policy plugin.
# Scoped to changes within plugins/external/cedar/ and this workflow.
# ===============================================================

name: Cedar Policy Plugin Tests

on:
push:
branches: ["main"]
paths:
- "plugins/external/cedar/**"
- ".github/workflows/cedar-plugin-tests.yml"
pull_request:
types: [opened, synchronize, ready_for_review]
branches: ["main"]
paths:
- "plugins/external/cedar/**"
- ".github/workflows/cedar-plugin-tests.yml"
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
test:
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
name: pytest and lint
runs-on: ubuntu-latest
timeout-minutes: 15

defaults:
run:
working-directory: plugins/external/cedar

steps:
- name: Checkout code
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
with:
persist-credentials: false

- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
with:
python-version: "3.12"
cache: pip

- name: Install package (dev extras)
run: python3 -m pip install -e ".[dev]"

- name: Run ruff check
run: ruff check .

- name: Run pytest with coverage
run: pytest -v --cov=cedarpolicyplugin --cov-report=term-missing
Loading