-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
101 additions
and
186 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains 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 |
---|---|---|
@@ -1,30 +1,57 @@ | ||
name: CI | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
push: | ||
branches: [master] | ||
paths: | ||
- grammar.js | ||
- src/** | ||
- test/** | ||
- bindings/** | ||
- binding.gyp | ||
pull_request: | ||
paths: | ||
- grammar.js | ||
- src/** | ||
- test/** | ||
- bindings/** | ||
- binding.gyp | ||
|
||
concurrency: | ||
group: ${{github.workflow}}-${{github.ref}} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
test: | ||
runs-on: ${{ matrix.os }} | ||
name: Test parser | ||
runs-on: ${{matrix.os}} | ||
strategy: | ||
fail-fast: true | ||
fail-fast: false | ||
matrix: | ||
os: [macos-latest, ubuntu-latest] | ||
os: [ubuntu-latest, windows-latest, macos-14] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Set up tree-sitter | ||
uses: tree-sitter/setup-action/cli@v1 | ||
- name: Set up examples | ||
run: | | ||
git clone https://github.com/ruby/spec examples/ruby_spec --single-branch --depth=1 --filter=blob:none | ||
- name: Run tests | ||
uses: tree-sitter/parser-test-action@v2 | ||
with: | ||
node-version: 18 | ||
- run: npm install | ||
- run: npm test | ||
|
||
test_windows: | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
test-rust: ${{runner.os == 'Linux'}} | ||
- name: Parse examples | ||
uses: tree-sitter/parse-action@v4 | ||
with: | ||
node-version: 18 | ||
- run: npm install | ||
- run: npm run test-windows | ||
files: | | ||
examples/*.rb | ||
!examples/ruby_spec/command_line/fixtures/bad_syntax.rb | ||
!examples/ruby_spec/command_line/fixtures/freeze_flag_required_diff_enc.rb | ||
!examples/ruby_spec/core/enumerable/shared/inject.rb | ||
!examples/ruby_spec/language/fixtures/freeze_magic_comment_required_diff_enc.rb | ||
!examples/ruby_spec/language/string_spec.rb | ||
!examples/ruby_spec/core/proc/ruby2_keywords_spec.rb | ||
!examples/ruby_spec/language/fixtures/utf16-be-nobom.rb | ||
!examples/ruby_spec/language/fixtures/utf16-le-nobom.rb | ||
!examples/ruby_spec/language/lambda_spec.rb |
This file contains 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,19 @@ | ||
name: Fuzz Parser | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
paths: | ||
- src/scanner.c | ||
pull_request: | ||
paths: | ||
- src/scanner.c | ||
|
||
jobs: | ||
fuzz: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Run fuzzer | ||
uses: tree-sitter/fuzz-action@v4 |
This file contains 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
This file contains 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,23 @@ | ||
name: Publish packages | ||
|
||
on: | ||
push: | ||
tags: ["*"] | ||
|
||
concurrency: | ||
group: ${{github.workflow}}-${{github.ref}} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
npm: | ||
uses: tree-sitter/workflows/.github/workflows/package-npm.yml@main | ||
secrets: | ||
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | ||
crates: | ||
uses: tree-sitter/workflows/.github/workflows/package-crates.yml@main | ||
secrets: | ||
CARGO_REGISTRY_TOKEN: ${{secrets.CARGO_REGISTRY_TOKEN}} | ||
pypi: | ||
uses: tree-sitter/workflows/.github/workflows/package-pypi.yml@main | ||
secrets: | ||
PYPI_API_TOKEN: ${{secrets.PYPI_API_TOKEN}} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.