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
8 changes: 4 additions & 4 deletions .github/ACTION_INTEGRATION_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
- **Errors**: ${{ steps.validate.outputs.invalid-files }}
- **Time**: ${{ steps.validate.outputs.validation-time }}ms

${{ steps.validate.outputs.invalid-files == '0' ? 'All SQL files valid!' : 'Please fix SQL errors' }}`;
${{ steps.validate.outputs.invalid-files == '0' ? 'All SQL files valid!' : 'Please fix SQL errors' }}`;

github.rest.issues.createComment({
issue_number: context.issue.number,
Expand Down Expand Up @@ -96,7 +96,7 @@ jobs:
"type": "section",
"text": {
"type": "mrkdwn",
"text": "SQL validation failed\n*Repository:* ${{ github.repository }}\n*Branch:* ${{ github.ref_name }}"
"text": "SQL validation failed\n*Repository:* ${{ github.repository }}\n*Branch:* ${{ github.ref_name }}"
}
}
]
Expand All @@ -120,7 +120,7 @@ jobs:
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*SQL Validation Results*\n\n• Files: ${{ steps.validate.outputs.validated-files }}\n• Errors: ${{ steps.validate.outputs.invalid-files }}\n• Time: ${{ steps.validate.outputs.validation-time }}ms\n• Status: ${{ steps.validate.outputs.invalid-files == '0' && 'Passed' || 'Failed' }}"
"text": "*SQL Validation Results*\n\n• Files: ${{ steps.validate.outputs.validated-files }}\n• Errors: ${{ steps.validate.outputs.invalid-files }}\n• Time: ${{ steps.validate.outputs.validation-time }}ms\n• Status: ${{ steps.validate.outputs.invalid-files == '0' && 'Passed' || 'Failed' }}"
}
},
{
Expand Down Expand Up @@ -691,7 +691,7 @@ jobs:
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `### SQL Validation\n\n✓ Files: ${validated}\n✗ Errors: ${invalid}`
body: `### SQL Validation\n\nFiles: ${validated}\nErrors: ${invalid}`
});

# Slack notification on failure
Expand Down
8 changes: 4 additions & 4 deletions .github/ACTION_QUICK_REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ jobs:

## Links

- [Full Documentation](../ACTION_README.md)
- [Testing Guide](../ACTION_TESTING_GUIDE.md)
- [Publishing Guide](../MARKETPLACE_PUBLISHING.md)
- [Example Workflows](../workflows/examples/)
- [Integration Guide](ACTION_INTEGRATION_GUIDE.md)
- [Testing Guide](ACTION_TESTING_GUIDE.md)
- [Publishing Guide](MARKETPLACE_PUBLISHING.md)
- [Example Workflows](./workflows/examples/)
103 changes: 48 additions & 55 deletions .github/ACTION_TESTING_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,57 +232,50 @@ EOF

## Manual Testing Checklist

Before publishing, test these scenarios:

### ✅ Basic Functionality

- [ ] Action installs GoSQLX successfully
- [ ] Validates valid SQL files without errors
- [ ] Detects and reports invalid SQL files
- [ ] Properly fails when `fail-on-error: true`
- [ ] Continues when `fail-on-error: false`

### ✅ File Pattern Matching

- [ ] `**/*.sql` finds all SQL files recursively
- [ ] `*.sql` finds only root-level SQL files
- [ ] Custom patterns work correctly
- [ ] Empty pattern results are handled gracefully

### ✅ Configuration Options

- [ ] `dialect` parameter changes validation behavior
- [ ] `strict` mode enables stricter validation
- [ ] `show-stats` displays performance metrics
- [ ] `config` file is loaded and applied
- [ ] `working-directory` changes context correctly

### ✅ Outputs

- [ ] `validated-files` count is accurate
- [ ] `invalid-files` count matches errors
- [ ] `validation-time` is reported
- [ ] `formatted-files` count works with format-check

### ✅ Error Handling

- [ ] Missing GoSQLX installation is detected
- [ ] No SQL files found is handled gracefully
- [ ] Invalid config file is reported
- [ ] File read errors are caught

### ✅ Performance

- [ ] Completes quickly (<2 minutes for 100 files)
- [ ] Binary caching works across runs
- [ ] Memory usage is reasonable

### ✅ Integration

- [ ] Works with matrix strategy
- [ ] Compatible with other actions
- [ ] PR comments work correctly
- [ ] Artifacts upload successfully
Before publishing, verify the following scenarios:

### Basic Functionality
- Action installs GoSQLX successfully
- Validates valid SQL files without errors
- Detects and reports invalid SQL files
- Properly fails when `fail-on-error: true`
- Continues when `fail-on-error: false`

### File Pattern Matching
- `**/*.sql` finds all SQL files recursively
- `*.sql` finds only root-level SQL files
- Custom patterns work correctly
- Empty pattern results are handled gracefully

### Configuration Options
- `dialect` parameter changes validation behavior
- `strict` mode enables stricter validation
- `show-stats` displays performance metrics
- `config` file is loaded and applied
- `working-directory` changes context correctly

### Outputs
- `validated-files` count is accurate
- `invalid-files` count matches errors
- `validation-time` is reported
- `formatted-files` count works with format-check

### Error Handling
- Missing GoSQLX installation is detected
- No SQL files found is handled gracefully
- Invalid config file is reported
- File read errors are caught

### Performance
- Completes quickly (under 2 minutes for 100 files)
- Binary caching works across runs
- Memory usage is reasonable

### Integration
- Works with matrix strategy
- Compatible with other actions
- PR comments work correctly
- Artifacts upload successfully

## Automated Testing

Expand Down Expand Up @@ -532,9 +525,9 @@ jobs:

After successful testing:

1. All tests pass
2. Performance meets targets
3. Documentation is complete
4. Ready for publishing
1. All tests pass
2. Performance meets targets
3. Documentation is complete
4. Ready for publishing

See [MARKETPLACE_PUBLISHING.md](MARKETPLACE_PUBLISHING.md) for publishing instructions.
32 changes: 16 additions & 16 deletions .github/MARKETPLACE_PUBLISHING.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,25 +65,25 @@ Release title: v1.0.0: GoSQLX GitHub Action - Ultra-Fast SQL Validation
Description:
## GoSQLX GitHub Action v1.0.0

### 🚀 Features
### Features

- **Ultra-Fast Validation**: 100-1000x faster than SQLFluff
- **Multi-Dialect Support**: PostgreSQL, MySQL, SQL Server, Oracle, SQLite
- **Format Checking**: Ensure consistent SQL formatting
- **Comprehensive Analysis**: Security and performance checks
- **Zero Configuration**: Works out of the box

### 📊 Performance
### Performance

- **Throughput**: 1.38M+ operations/second
- **Validation Speed**: <10ms for typical queries
- **Batch Processing**: 100+ files/second

### 📖 Documentation
### Documentation

See [ACTION_README.md](ACTION_README.md) for complete documentation and examples.
See [ACTION_QUICK_REFERENCE.md](ACTION_QUICK_REFERENCE.md) for complete documentation and examples.

### 🎯 Quick Start
### Quick Start

```yaml
- uses: ajitpratap0/GoSQLX@v1
Expand All @@ -92,17 +92,17 @@ See [ACTION_README.md](ACTION_README.md) for complete documentation and examples
validate: true
```

### 🔗 Links
### Links

- [Documentation](https://github.com/ajitpratap0/GoSQLX#readme)
- [Examples](.github/workflows/examples/)
- [Testing Guide](.github/ACTION_TESTING_GUIDE.md)
- [Examples](./workflows/examples/)
- [Testing Guide](ACTION_TESTING_GUIDE.md)

### 🐛 Known Issues
### Known Issues

None at this time.

### 🙏 Acknowledgments
### Acknowledgments

Built with GitHub Actions and Go.
```
Expand Down Expand Up @@ -138,7 +138,7 @@ branding:
- Secondary category: Code quality

3. **Marketplace README**:
- The `ACTION_README.md` content should be the main documentation
- The `ACTION_QUICK_REFERENCE.md` content should be the main documentation
- Consider copying it to root README or having a marketplace-specific version

### 5. Version Management Strategy
Expand Down Expand Up @@ -259,11 +259,11 @@ jobs:
Add relevant badges to increase trust:

```markdown
[![GitHub Marketplace](https://img.shields.io/badge/Marketplace-GoSQLX-blue.svg)](...)
[![GitHub Release](https://img.shields.io/github/release/ajitpratap0/GoSQLX.svg)](...)
[![GitHub Stars](https://img.shields.io/github/stars/ajitpratap0/GoSQLX.svg)](...)
[![GitHub Marketplace](https://img.shields.io/badge/Marketplace-GoSQLX-blue.svg)](https://github.com/marketplace/actions/gosqlx-sql-validator)
[![GitHub Release](https://img.shields.io/github/release/ajitpratap0/GoSQLX.svg)](https://github.com/ajitpratap0/GoSQLX/releases)
[![GitHub Stars](https://img.shields.io/github/stars/ajitpratap0/GoSQLX.svg)](https://github.com/ajitpratap0/GoSQLX)
[![License: AGPL-3.0](https://img.shields.io/badge/License-AGPL--3.0-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)
[![Go Report Card](https://goreportcard.com/badge/github.com/ajitpratap0/GoSQLX)](...)
[![Go Report Card](https://goreportcard.com/badge/github.com/ajitpratap0/GoSQLX)](https://goreportcard.com/report/github.com/ajitpratap0/GoSQLX)
```

## Updating the Action
Expand Down Expand Up @@ -477,4 +477,4 @@ git push -f origin v1
- [ ] Post-release testing completed
- [ ] Announcement prepared

Ready to publish! 🚀
Ready to publish!
Loading
Loading