Skip to content
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

Update workflows, bindings, and versions #256

Merged
merged 2 commits into from
Mar 10, 2024
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
39 changes: 39 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.{json,toml,yml,gyp}]
indent_style = space
indent_size = 2

[*.js]
indent_style = space
indent_size = 2

[*.rs]
indent_style = space
indent_size = 4

[*.{c,cc,h}]
indent_style = space
indent_size = 4

[*.{py,pyi}]
indent_style = space
indent_size = 4

[*.swift]
indent_style = space
indent_size = 4

[*.go]
indent_style = tab
indent_size = 8

[Makefile]
indent_style = tab
indent_size = 8
19 changes: 15 additions & 4 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
/examples/* linguist-vendored
* text eol=lf

src/tree_sitter/* linguist-generated
src/grammar.json linguist-generated
src/node-types.json linguist-generated
test/corpus/crlf.txt eol=crlf

script/known-failures.txt -diff

examples/* linguist-vendored

src/*.json linguist-generated
src/parser.c linguist-generated
src/tree_sitter/* linguist-generated

bindings/** linguist-generated
binding.gyp linguist-generated
setup.py linguist-generated
Makefile linguist-generated
Package.swift linguist-generated
81 changes: 56 additions & 25 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,68 @@
name: CI

on:
push:
branches:
- master
branches: [master]
paths:
- grammar.js
- src/**
- test/**
- bindings/**
- binding.gyp
pull_request:
branches:
- master
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
- name: Set up the repo
uses: tree-sitter/[email protected]
with:
submodules: true
fetch-depth: 0
- uses: actions/setup-node@v4
node-version: ${{vars.NODE_VERSION}}
- name: Set up examples
shell: sh
run: |-
git clone https://github.com/Bash-it/bash-it examples/bash-it -q --single-branch --depth=1
git clone https://git.savannah.gnu.org/git/bash.git examples/bash -q --single-branch --depth=1
git clone https://anongit.gentoo.org/git/repo/gentoo.git examples/gentoo -q --single-branch --depth=1
if [[ '${{runner.os}}' != Windows ]]; then
git clone https://github.com/oilshell/wild-corpus examples/wild-corpus -q --single-branch --depth=1
fi
- name: Read known failures
uses: actions/github-script@v7
id: known-failures
with:
node-version: 18
- run: npm install
- run: npm test
test_windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- uses: actions/setup-node@v4
result-encoding: string
script: "return require('fs').readFileSync('script/known-failures.txt', 'utf8')"
- name: Run tests
uses: tree-sitter/[email protected]
with:
node-version: 18
- run: npm install
- run: npm run-script test-windows
lint: ${{runner.os == 'Linux'}}
test-library: ${{runner.os == 'Linux'}}
corpus-files: |
examples/*.sh
examples/bash-it/**/*.sh
examples/bash-it/**/*.bash
examples/bash/**/*.sh
examples/bash/**/*.tests
examples/gentoo/**/*.sh
examples/gentoo/**/*.eclass
examples/wild-corpus/**/*.sh
# examples/gentoo/**/*.ebuild
!examples/gentoo/eclass/ruby-fakegem.eclass
${{steps.known-failures.outputs.result}}
6 changes: 1 addition & 5 deletions .github/workflows/fuzz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,4 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: vigoux/tree-sitter-fuzz-action@v1
with:
language: bash
external-scanner: src/scanner.c
time: 60
- uses: tree-sitter/fuzz-action@v4
19 changes: 0 additions & 19 deletions .github/workflows/lint.yml

This file was deleted.

94 changes: 0 additions & 94 deletions .github/workflows/pack.yml

This file was deleted.

Loading