-
Notifications
You must be signed in to change notification settings - Fork 0
Implement StructKit Composite Action #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
7d4f657
feat: implement StructKit composite action
cursoragent 736746f
fix: remove pip cache from setup-python
cursoragent 5f1a264
fix: replace --version with --help check
cursoragent 103bd53
fix: disable unsupported CLI flags by default
cursoragent 9d5f3fb
fix: update test workflow with valid StructKit configs
cursoragent e00eeee
fix: use correct StructKit YAML format in tests
cursoragent ace8ce6
refactor: rename references from struct-action to structkit-action
cursoragent 4caf846
chore: update actions/checkout from v4 to v7
cursoragent File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,110 @@ | ||
| name: Test Action | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main, cursor/**] | ||
| pull_request: | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| test-validate: | ||
| name: Test Validate Command | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v7 | ||
|
|
||
| - name: Create test structure file | ||
| run: | | ||
| cat > .struct.yaml << 'EOF' | ||
| files: | ||
| - test-file.txt: | ||
| content: "Hello from StructKit!" | ||
| EOF | ||
|
|
||
| - name: Run validate | ||
| uses: ./ | ||
| with: | ||
| command: validate | ||
| struct_file: .struct.yaml | ||
|
|
||
| test-generate-dry-run: | ||
| name: Test Generate Dry Run | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v7 | ||
|
|
||
| - name: Create test structure file | ||
| run: | | ||
| cat > .struct.yaml << 'EOF' | ||
| files: | ||
| - test-output/sample.txt: | ||
| content: "Generated by StructKit Action!" | ||
| EOF | ||
|
|
||
| - name: Run generate (dry-run) | ||
| id: generate | ||
| uses: ./ | ||
| with: | ||
| command: generate | ||
| struct_file: .struct.yaml | ||
| dry_run: true | ||
|
|
||
| - name: Check outputs | ||
| run: | | ||
| echo "Success: ${{ steps.generate.outputs.success }}" | ||
| echo "Has changes: ${{ steps.generate.outputs.has_changes }}" | ||
| echo "Exit code: ${{ steps.generate.outputs.exit_code }}" | ||
|
|
||
| test-generate-real: | ||
| name: Test Generate (Real) | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v7 | ||
|
|
||
| - name: Create test structure file | ||
| run: | | ||
| cat > .struct.yaml << 'EOF' | ||
| files: | ||
| - generated/test.txt: | ||
| content: "This file was generated!" | ||
| - generated/nested/file.txt: | ||
| content: "Nested file content" | ||
| EOF | ||
|
|
||
| - name: Run generate | ||
| uses: ./ | ||
| with: | ||
| command: generate | ||
| struct_file: .struct.yaml | ||
| output_dir: . | ||
|
|
||
| - name: Verify generated files | ||
| run: | | ||
| test -f generated/test.txt || (echo "File not created!" && exit 1) | ||
| test -f generated/nested/file.txt || (echo "Nested file not created!" && exit 1) | ||
| echo "Generated files verified successfully!" | ||
|
|
||
| test-custom-version: | ||
| name: Test Custom StructKit Version | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v7 | ||
|
|
||
| - name: Create test structure file | ||
| run: | | ||
| cat > .struct.yaml << 'EOF' | ||
| files: | ||
| - version-test.txt: | ||
| content: "Testing version" | ||
| EOF | ||
|
|
||
| - name: Run with git installation | ||
| uses: ./ | ||
| with: | ||
| command: validate | ||
| struct_file: .struct.yaml | ||
| structkit_version: "https://github.com/httpdss/structkit.git@main" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| # Python | ||
| __pycache__/ | ||
| *.py[cod] | ||
| *$py.class | ||
| *.so | ||
| .Python | ||
| build/ | ||
| develop-eggs/ | ||
| dist/ | ||
| downloads/ | ||
| eggs/ | ||
| .eggs/ | ||
| lib/ | ||
| lib64/ | ||
| parts/ | ||
| sdist/ | ||
| var/ | ||
| wheels/ | ||
| *.egg-info/ | ||
| .installed.cfg | ||
| *.egg | ||
|
|
||
| # Virtual environments | ||
| venv/ | ||
| ENV/ | ||
| env/ | ||
|
|
||
| # IDE | ||
| .vscode/ | ||
| .idea/ | ||
| *.swp | ||
| *.swo | ||
| *~ | ||
|
|
||
| # OS | ||
| .DS_Store | ||
| Thumbs.db | ||
|
|
||
| # Test outputs | ||
| .structkit-diff.txt | ||
| test-output/ | ||
| generated/ | ||
|
|
||
| # Temporary files | ||
| *.tmp | ||
| *.log |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| MIT License | ||
|
|
||
| Copyright (c) 2026 Kenneth Belitzky | ||
|
|
||
| Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| of this software and associated documentation files (the "Software"), to deal | ||
| in the Software without restriction, including without limitation the rights | ||
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| copies of the Software, and to permit persons to whom the Software is | ||
| furnished to do so, subject to the following conditions: | ||
|
|
||
| The above copyright notice and this permission notice shall be included in all | ||
| copies or substantial portions of the Software. | ||
|
|
||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
| SOFTWARE. |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cursoragent make sure actions/checkout uses v7 and not v4
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done! I've updated all
actions/checkoutreferences from v4 to v7 across the entire repository:Updated files:
.github/workflows/test.yml(4 occurrences)action.yml(1 occurrence)README.md(7 occurrences in examples)examples/validate-pr.yml(1 occurrence)examples/drift-detection.yml(1 occurrence)examples/generate-and-commit.yml(1 occurrence)examples/scheduled-check.yml(1 occurrence)examples/custom-structures.yml(1 occurrence)Total: 17 occurrences updated from
actions/checkout@v4toactions/checkout@v7The changes have been committed and pushed to the PR branch.