Skip to content

Commit

Permalink
ci: update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
ObserverOfTime authored and amaanq committed Mar 10, 2024
1 parent 03e88c1 commit bac8189
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 11 deletions.
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
* text eol=lf

examples/crlf-line-endings.py eol=crlf
examples/python2-grammar-crlf.py eol=crlf
examples/python3-grammar-crlf.py eol=crlf

src/*.json linguist-generated
src/parser.c linguist-generated
src/tree_sitter/* linguist-generated
Expand All @@ -8,3 +12,4 @@ bindings/** linguist-generated
binding.gyp linguist-generated
setup.py linguist-generated
Makefile linguist-generated
Package.swift linguist-generated
19 changes: 9 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,22 +36,21 @@ jobs:
node-version: ${{vars.NODE_VERSION}}
- name: Set up examples
run: |-
git clone https://github.com/numpy/numpy examples/numpy --depth=1 --filter=blob:none
git clone https://github.com/django/django examples/django --depth=1 --filter=blob:none
git clone https://github.com/pallets/flask examples/flask --depth=1 --filter=blob:none
git clone https://github.com/python/cpython examples/cpython --depth=1 --filter=blob:none
git clone https://github.com/numpy/numpy examples/numpy --single-branch --depth=1 --filter=blob:none
git clone https://github.com/django/django examples/django --single-branch --depth=1 --filter=blob:none
git clone https://github.com/pallets/flask examples/flask --single-branch --depth=1 --filter=blob:none
git clone https://github.com/python/cpython examples/cpython --single-branch --depth=1 --filter=blob:none
- name: Run tests
uses: tree-sitter/parser-test-action@v1.1
uses: tree-sitter/parser-test-action@v1.2
with:
lint: true
lint: ${{runner.os == 'Linux'}}
test-library: ${{runner.os == 'Linux'}}
examples: |
corpus-files: |
examples/**/*.py
!examples/cpython/Lib/test/badsyntax_3131.py
!examples/cpython/Lib/test/badsyntax_future8.py
!examples/cpython/Lib/test/test_compile.py
!examples/cpython/Lib/test/tokenizedata/badsyntax_3131.py
!examples/cpython/Tools/build/generate_re_casefix.py
invalid-files: |
examples/cpython/Lib/test/tokenizedata/badsyntax_3131.py
fuzz:
name: Fuzz parser
runs-on: ubuntu-latest
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,8 @@ jobs:
crates:
uses: tree-sitter/workflows/.github/workflows/package-crates.yml@main
secrets:
CARGO_REGISTRY_TOKEN: ${{secrets.CARGO_TOKEN}}
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}}
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
[![matrix][matrix]](https://matrix.to/#/#tree-sitter-chat:matrix.org)
[![crates][crates]](https://crates.io/crates/tree-sitter-python)
[![npm][npm]](https://www.npmjs.com/package/tree-sitter-python)
[![pypi][pypi]](https://pypi.org/project/tree-sitter-python/)

Python grammar for [tree-sitter][].

Expand All @@ -20,3 +21,4 @@ Python grammar for [tree-sitter][].
[matrix]: https://img.shields.io/matrix/tree-sitter-chat%3Amatrix.org?logo=matrix&label=matrix
[npm]: https://img.shields.io/npm/v/tree-sitter-python?logo=npm
[crates]: https://img.shields.io/crates/v/tree-sitter-python?logo=rust
[pypi]: https://img.shields.io/pypi/v/tree-sitter-python?logo=pypi&logoColor=ffd242

0 comments on commit bac8189

Please sign in to comment.