Skip to content

Commit bac8189

Browse files
ObserverOfTimeamaanq
authored andcommitted
ci: update workflows
1 parent 03e88c1 commit bac8189

File tree

4 files changed

+21
-11
lines changed

4 files changed

+21
-11
lines changed

.gitattributes

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
* text eol=lf
22

3+
examples/crlf-line-endings.py eol=crlf
4+
examples/python2-grammar-crlf.py eol=crlf
5+
examples/python3-grammar-crlf.py eol=crlf
6+
37
src/*.json linguist-generated
48
src/parser.c linguist-generated
59
src/tree_sitter/* linguist-generated
@@ -8,3 +12,4 @@ bindings/** linguist-generated
812
binding.gyp linguist-generated
913
setup.py linguist-generated
1014
Makefile linguist-generated
15+
Package.swift linguist-generated

.github/workflows/ci.yml

+9-10
Original file line numberDiff line numberDiff line change
@@ -36,22 +36,21 @@ jobs:
3636
node-version: ${{vars.NODE_VERSION}}
3737
- name: Set up examples
3838
run: |-
39-
git clone https://github.com/numpy/numpy examples/numpy --depth=1 --filter=blob:none
40-
git clone https://github.com/django/django examples/django --depth=1 --filter=blob:none
41-
git clone https://github.com/pallets/flask examples/flask --depth=1 --filter=blob:none
42-
git clone https://github.com/python/cpython examples/cpython --depth=1 --filter=blob:none
39+
git clone https://github.com/numpy/numpy examples/numpy --single-branch --depth=1 --filter=blob:none
40+
git clone https://github.com/django/django examples/django --single-branch --depth=1 --filter=blob:none
41+
git clone https://github.com/pallets/flask examples/flask --single-branch --depth=1 --filter=blob:none
42+
git clone https://github.com/python/cpython examples/cpython --single-branch --depth=1 --filter=blob:none
4343
- name: Run tests
44-
uses: tree-sitter/parser-test-action@v1.1
44+
uses: tree-sitter/parser-test-action@v1.2
4545
with:
46-
lint: true
46+
lint: ${{runner.os == 'Linux'}}
4747
test-library: ${{runner.os == 'Linux'}}
48-
examples: |
48+
corpus-files: |
4949
examples/**/*.py
50-
!examples/cpython/Lib/test/badsyntax_3131.py
51-
!examples/cpython/Lib/test/badsyntax_future8.py
5250
!examples/cpython/Lib/test/test_compile.py
53-
!examples/cpython/Lib/test/tokenizedata/badsyntax_3131.py
5451
!examples/cpython/Tools/build/generate_re_casefix.py
52+
invalid-files: |
53+
examples/cpython/Lib/test/tokenizedata/badsyntax_3131.py
5554
fuzz:
5655
name: Fuzz parser
5756
runs-on: ubuntu-latest

.github/workflows/release.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,8 @@ jobs:
1616
crates:
1717
uses: tree-sitter/workflows/.github/workflows/package-crates.yml@main
1818
secrets:
19-
CARGO_REGISTRY_TOKEN: ${{secrets.CARGO_TOKEN}}
19+
CARGO_REGISTRY_TOKEN: ${{secrets.CARGO_REGISTRY_TOKEN}}
20+
pypi:
21+
uses: tree-sitter/workflows/.github/workflows/package-pypi.yml@main
22+
secrets:
23+
PYPI_API_TOKEN: ${{secrets.PYPI_API_TOKEN}}

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
[![matrix][matrix]](https://matrix.to/#/#tree-sitter-chat:matrix.org)
66
[![crates][crates]](https://crates.io/crates/tree-sitter-python)
77
[![npm][npm]](https://www.npmjs.com/package/tree-sitter-python)
8+
[![pypi][pypi]](https://pypi.org/project/tree-sitter-python/)
89

910
Python grammar for [tree-sitter][].
1011

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

0 commit comments

Comments
 (0)