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
34 changes: 34 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
## Summary

<!-- Brief description of the changes -->

## Change Type

<!-- Mark the relevant type(s) -->

- [ ] Infrastructure (snowddl/*.yaml changes)
- [ ] Code (src/, scripts/ changes)
- [ ] Documentation
- [ ] Tests
- [ ] CI/CD

## Related Issues

<!-- Link related issues using "Fixes #123" or "Closes #123" -->

Fixes #

## Test Plan

<!-- Describe how you tested these changes -->

- [ ] Ran `uv run pytest`
- [ ] Ran `uv run pre-commit run --all-files`
- [ ] Ran `uv run snowddl-plan` (for infrastructure changes)

## Checklist

- [ ] Tests pass locally
- [ ] Pre-commit checks pass
- [ ] Documentation updated (if applicable)
- [ ] No secrets or sensitive data included
44 changes: 44 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Configuration for actions/labeler
# Maps file patterns to labels

infrastructure:
- changed-files:
- any-glob-to-any-file: 'snowddl/**/*.yaml'

user-change:
- changed-files:
- any-glob-to-any-file: 'snowddl/user.yaml'

security:
- changed-files:
- any-glob-to-any-file:
- 'snowddl/*policy*.yaml'
- 'snowddl/authentication*.yaml'
- 'snowddl/network*.yaml'

code:
- changed-files:
- any-glob-to-any-file:
- 'src/**/*.py'
- 'scripts/**/*.py'

tests:
- changed-files:
- any-glob-to-any-file: 'tests/**'

documentation:
- changed-files:
- any-glob-to-any-file:
- 'docs/**'
- '*.md'
- 'README.md'

ci/cd:
- changed-files:
- any-glob-to-any-file: '.github/**'

dependencies:
- changed-files:
- any-glob-to-any-file:
- 'pyproject.toml'
- 'uv.lock'
60 changes: 60 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: CI

on:
pull_request:
branches: [main, v0.2]
push:
branches: [main, v0.2]

jobs:
lint:
name: Lint & Format Check
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install UV
uses: astral-sh/setup-uv@v4
with:
version: "latest"

- name: Set up Python
run: uv python install 3.12

- name: Install dependencies
run: uv sync --all-extras --dev

- name: Run pre-commit
run: uv run pre-commit run --all-files

test:
name: Run Tests
runs-on: ubuntu-latest
needs: lint

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install UV
uses: astral-sh/setup-uv@v4
with:
version: "latest"

- name: Set up Python
run: uv python install 3.12

- name: Install dependencies
run: uv sync --all-extras --dev

- name: Run tests
run: uv run pytest -v --tb=short
env:
SNOWFLAKE_ACCOUNT: "test_account"
SNOWFLAKE_USER: "test_user"
SNOWFLAKE_PASSWORD: "test_password"
SNOWFLAKE_WAREHOUSE: "test_warehouse"
SNOWFLAKE_DATABASE: "test_database"
SNOWFLAKE_ROLE: "test_role"
22 changes: 22 additions & 0 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: PR Labeler

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

jobs:
label:
name: Label PR
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Label PR based on changed files
uses: actions/labeler@v5
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
Loading