mirror of
https://github.com/ivuorinen/tree-sitter-shellspec.git
synced 2026-01-26 11:43:59 +00:00
feat: implement complete tree-sitter-shellspec grammar with comprehensive testing
- Add full ShellSpec grammar extending tree-sitter-bash - Support all ShellSpec constructs: Describe, Context, It, hooks, utilities - Include Data block parsing with statements and argument styles - Add 61 comprehensive test cases covering real-world patterns - Implement optimized GitHub workflows with CI/CD automation - Configure complete development tooling (linting, formatting, pre-commit) - Add comprehensive documentation and contribution guidelines - Optimize grammar conflicts to zero warnings - Support editor integration for Neovim, VS Code, Emacs Breaking Changes: - Initial release, no previous API to break BREAKING CHANGE: Initial implementation of tree-sitter-shellspec grammar # Conflicts: # .github/workflows/codeql.yml # .github/workflows/pr-lint.yml # .pre-commit-config.yaml # Conflicts: # .github/workflows/pr-lint.yml # Conflicts: # .github/workflows/pr-lint.yml
This commit is contained in:
120
.github/actions/README.md
vendored
Normal file
120
.github/actions/README.md
vendored
Normal file
@@ -0,0 +1,120 @@
|
||||
# Composite Actions
|
||||
|
||||
This directory contains reusable composite actions to reduce duplication across workflows.
|
||||
|
||||
## Available Actions
|
||||
|
||||
### setup-node
|
||||
|
||||
Sets up Node.js with caching and installs dependencies.
|
||||
|
||||
**Inputs:**
|
||||
|
||||
- `node-version` (optional): Node.js version, defaults to '24'
|
||||
- `registry-url` (optional): NPM registry URL
|
||||
|
||||
**Usage:**
|
||||
|
||||
```yaml
|
||||
- uses: ./.github/actions/setup-node
|
||||
with:
|
||||
node-version: 22
|
||||
```
|
||||
|
||||
### setup-treesitter
|
||||
|
||||
Installs Tree-sitter CLI and generates the grammar.
|
||||
|
||||
**Usage:**
|
||||
|
||||
```yaml
|
||||
- uses: ./.github/actions/setup-treesitter
|
||||
```
|
||||
|
||||
### setup-dev
|
||||
|
||||
Complete development environment setup (combines setup-node + setup-treesitter).
|
||||
|
||||
**Inputs:**
|
||||
|
||||
- `node-version` (optional): Node.js version, defaults to '24'
|
||||
- `registry-url` (optional): NPM registry URL
|
||||
- `skip-checkout` (optional): Skip repository checkout, defaults to 'false'
|
||||
|
||||
**Usage:**
|
||||
|
||||
```yaml
|
||||
- uses: ./.github/actions/setup-dev
|
||||
with:
|
||||
node-version: 24
|
||||
skip-checkout: 'true'
|
||||
```
|
||||
|
||||
### test-grammar
|
||||
|
||||
Runs comprehensive grammar tests including parser validation.
|
||||
|
||||
**Inputs:**
|
||||
|
||||
- `skip-sample-test` (optional): Skip complex sample test, defaults to 'false'
|
||||
|
||||
**Usage:**
|
||||
|
||||
```yaml
|
||||
- uses: ./.github/actions/test-grammar
|
||||
with:
|
||||
skip-sample-test: 'true'
|
||||
```
|
||||
|
||||
### test-coverage
|
||||
|
||||
Analyzes test coverage and validates minimum requirements.
|
||||
|
||||
**Inputs:**
|
||||
|
||||
- `minimum-tests` (optional): Minimum tests required, defaults to '55'
|
||||
|
||||
**Outputs:**
|
||||
|
||||
- `total-tests`: Total number of tests found
|
||||
- `passing-tests`: Number of passing tests
|
||||
- `coverage-percent`: Test coverage percentage
|
||||
|
||||
**Usage:**
|
||||
|
||||
```yaml
|
||||
- uses: ./.github/actions/test-coverage
|
||||
with:
|
||||
minimum-tests: 60
|
||||
```
|
||||
|
||||
## Workflow Usage Examples
|
||||
|
||||
### Test Workflow (Simplified)
|
||||
|
||||
```yaml
|
||||
jobs:
|
||||
test:
|
||||
steps:
|
||||
- uses: ./.github/actions/setup-dev
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- uses: ./.github/actions/test-grammar
|
||||
```
|
||||
|
||||
### Release Workflow (Simplified)
|
||||
|
||||
```yaml
|
||||
jobs:
|
||||
test:
|
||||
steps:
|
||||
- uses: ./.github/actions/setup-dev
|
||||
- uses: ./.github/actions/test-grammar
|
||||
with:
|
||||
skip-sample-test: 'true'
|
||||
|
||||
lint:
|
||||
steps:
|
||||
- uses: ./.github/actions/setup-node
|
||||
- uses: ivuorinen/actions/pr-lint@latest
|
||||
```
|
||||
Reference in New Issue
Block a user