Skip to content
Merged
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
114 changes: 58 additions & 56 deletions .github/workflows/azure-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,70 +1,72 @@
---
name: Deploy to Azure App Service

on:
push:
branches:
- master
# - release-*
workflow_dispatch: #Allow manual triggers
push:
branches:
- master
# - release-*
workflow_dispatch: # Allow manual triggers

permissions:
contents: read
contents: read

jobs:
build-and-test:
name: Build and Test
runs-on: ubuntu-latest
build-and-test:
name: Build and Test
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive # Include cdisc-json-validation submodule
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive # Include cdisc-json-validation submodule

- name: Set up Python 3.13
uses: actions/setup-python@v5
with:
python-version: '3.13'
cache: 'pip'
cache-dependency-path: |
pyproject.toml
requirements.txt
- name: Set up Python 3.13
uses: actions/setup-python@v5
with:
python-version: "3.13"
cache: "pip"
cache-dependency-path: |
pyproject.toml
requirements.txt

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"

- name: Run tests
run: |
pytest -q tests --disable-warnings --tb=short
env:
CDISC_CONCEPTS_JSON: '[]' # Bypass CDISC API for tests
- name: Run tests
run: |
pytest -q tests --disable-warnings --tb=short
env:
CDISC_CONCEPTS_JSON: "[]" # Bypass CDISC API for tests

- name: Create deployment package
run: |
# Nothing special needed - Azure will handle pip install
echo "Build successful"
- name: Create deployment package
run: |
# Nothing special needed - Azure will handle pip install
echo "Build successful"

deploy:
name: Deploy to Azure
needs: build-and-test
runs-on: ubuntu-latest
environment: production # Optional: requires manual approval
deploy:
name: Deploy to Azure
needs: build-and-test
runs-on: ubuntu-latest
environment: production # Optional: requires manual approval

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
- name: Deploy to Azure Web App
uses: azure/webapps-deploy@v2
with:
app-name: ${{ secrets.AZURE_WEBAPP_NAME }}
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
package: .
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
- name: Deploy to Azure Web App
uses: azure/webapps-deploy@v2
with:
app-name: ${{ secrets.AZURE_WEBAPP_NAME }}
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
package: .

- name: Verify deployment
run: |
echo "Deployment complete!"
echo "App URL: https://${{ secrets.AZURE_WEBAPP_NAME }}.azurewebsites.net"
- name: Verify deployment
run: |
echo "Deployment complete!"
echo "App URL:
https://${{ secrets.AZURE_WEBAPP_NAME }}.azurewebsites.net"
11 changes: 6 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
# yaml-language-server:
# $schema=https://json.schemastore.org/github-workflow.json
name: CI (Python)

on:
push:
branches: [ "master" ]
branches: ["master"]
pull_request:
branches: [ "master" ]
branches: ["master"]

permissions:
contents: read
Expand All @@ -21,7 +22,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [ "3.11", "3.12", "3.13", "3.14" ]
python-version: ["3.11", "3.12", "3.13", "3.14"]

steps:
- name: Checkout
Expand Down Expand Up @@ -62,4 +63,4 @@ jobs:
with:
name: test-reports-py${{ matrix.python-version }}
path: reports/
if-no-files-found: ignore
if-no-files-found: ignore
58 changes: 58 additions & 0 deletions .github/workflows/claude-changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
name: Generate Changelog

on:
push:
tags:
- 'release-v*'

jobs:
changelog:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Get commits since last tag
id: commits
run: |
PREVIOUS_TAG=$(git describe --tags
--abbrev=0 HEAD^ 2>/dev/null || echo "")
if [ -n "$PREVIOUS_TAG" ]; then
COMMITS=$(git log ${PREVIOUS_TAG}..HEAD --oneline)
else
COMMITS=$(git log --oneline -20)
fi
echo "commits<<EOF" >> $GITHUB_OUTPUT
echo "$COMMITS" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT

- name: Generate changelog with Claude
uses: anthropics/claude-code-action@v1
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
github_token: ${{ secrets.GITHUB_TOKEN }}
prompt: |
Generate a changelog for release ${{ github.ref_name }}.

Commits since last release:
${{ steps.commits.outputs.commits }}

Format:
## What's New in ${{ github.ref_name }}

### Features
- ...

### Bug Fixes
- ...

### Breaking Changes
- ... (only if any)

Write the changelog to CHANGELOG.md (prepared before existing
content).
Then commit and push the updated CHANGELOG.md.
25 changes: 14 additions & 11 deletions .github/workflows/claude-comment-review.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Claude PR Comment Review

on:
Expand All @@ -9,6 +10,7 @@ on:
permissions:
contents: read
pull-requests: write
id-token: write

jobs:
review:
Expand All @@ -18,15 +20,16 @@ jobs:
github.event.pull_request != null) }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Checkout
uses: actions/checkout@v4

- name: Run Claude Code Action (comment-triggered)
uses: anthropics/claude-code-action@v1
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY}}
prompt: |
You are reviewing a GitHub Pull Request. Focus on security, correctness, clarity.
- Only comment on files that changed in this PR.
- Prioritize actionable fixes and cite specific lines.
- Keep comments concise; avoid restating code.
- name: Run Claude Code Action (comment-triggered)
uses: anthropics/claude-code-action@v1
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY}}
prompt: |
You are reviewing a GitHub Pull Request. Focus on
security, correctness, clarity.
- Only comment on files that changed in this PR.
- Prioritize actionable fixes and cite specific lines.
- Keep comments concise; avoid restating code.
34 changes: 34 additions & 0 deletions .github/workflows/claude-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: Claude Code Review

on:
pull_request:
types: [opened, synchronize, reopened]

permissions:
contents: read
pull-requests: write
id-token: write

jobs:
claude-review:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # Full history needed for diff analysis

- name: Claude Code claude-review
uses: anthropics/claude-code-action@v1
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
prompt: |
Review this pull request and post inline comments for:
1. Logic errors and edge cases
2. Security vulnerabilities (SQL injection, XSS, auth bypasses)
3. Performance issues (N+1 queries, blocking calls, memory leaks)
4. Missing error handling
5. Missing unit tests
6. Non conformance with USDM v4.0 schema (schema/dataStructure.yml)
Focus on changed files only, Be specific - cite line numbers
40 changes: 40 additions & 0 deletions .github/workflows/claude-test-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
name: Claude Anaylze Test Failures

on:
workflow_run:
workflows: ["Tests"]
types: [completed]

jobs:
analyze:
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
runs-on: ubuntu-latest
permissions:
contents: read
issues: write
pull-requests: write
id-token: write
steps:
- uses: actions/checkout@v4

- name: Download test artifacts
uses: actions/download-artifact@v4
with:
name: test-results
run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Analyze with Claude
uses: anthropics/claude-code-action@v1
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
github_token: ${{ secrets.GITHUB_TOKEN }}
prompt: |
Tests failed on the latest push.
Analyze the failures and:
1. Identify the root cause (not just which test failed)
2. Point to the specific file and line that likely caused it
3. Suggest a fix or investigation path

Post this as a comment on the PR that triggered these tests.
Loading
Loading