From 56b63a27f70703e47fa38ebd18507adfc46a105f Mon Sep 17 00:00:00 2001 From: ObserverOfTime Date: Thu, 7 Mar 2024 16:02:31 +0200 Subject: [PATCH] ci: update workflows --- .gitattributes | 5 +++++ .github/workflows/ci.yml | 23 +++++++++++------------ .github/workflows/release.yml | 6 +++++- 3 files changed, 21 insertions(+), 13 deletions(-) diff --git a/.gitattributes b/.gitattributes index 9f71c8f..f148e7f 100644 --- a/.gitattributes +++ b/.gitattributes @@ -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 @@ -8,3 +12,4 @@ bindings/** linguist-generated binding.gyp linguist-generated setup.py linguist-generated Makefile linguist-generated +Package.swift linguist-generated diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f4f500c..f8c2f77 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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/badsyntax_3131.py + examples/cpython/Lib/test/badsyntax_future8.py + examples/cpython/Lib/test/tokenizedata/badsyntax_3131.py fuzz: name: Fuzz parser runs-on: ubuntu-latest diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5f9525a..42b1b0f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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_TOKEN}}