Skip to content

Upgrade to tree-sitter 0.22 and add Python, C and Go bindings #13

Upgrade to tree-sitter 0.22 and add Python, C and Go bindings

Upgrade to tree-sitter 0.22 and add Python, C and Go bindings #13

Workflow file for this run

name: CI
on: [push, pull_request]
concurrency:
group: ${{github.workflow}}-${{github.ref}}
cancel-in-progress: true
jobs:
test:
name: Test parser
runs-on: ${{matrix.os}}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-14]
steps:
- name: Set up the repo
uses: tree-sitter/parser-setup-action@v1.2
- name: Set up examples
run: |-
git clone https://github.com/0install/0install examples/0install --single-branch --depth=1 --filter=blob:none
git clone https://github.com/BinaryAnalysisPlatform/bap examples/bap --single-branch --depth=1 --filter=blob:none
git clone https://github.com/dbuenzli/cmdliner examples/cmdliner --single-branch --depth=1 --filter=blob:none
git clone https://github.com/facebook/flow examples/flow --single-branch --depth=1 --filter=blob:none
git clone https://github.com/facebook/pyre-check examples/pyre-check --single-branch --depth=1 --filter=blob:none
git clone https://github.com/garrigue/lablgtk examples/lablgtk --single-branch --depth=1 --filter=blob:none
git clone https://github.com/janestreet/base examples/base --single-branch --depth=1 --filter=blob:none
git clone https://github.com/mirage/ocaml-cohttp examples/ocaml-cohttp --single-branch --depth=1 --filter=blob:none
git clone https://github.com/ocaml/dune examples/dune --single-branch --depth=1 --filter=blob:none
git clone https://github.com/ocaml/merlin examples/merlin --single-branch --depth=1 --filter=blob:none
git clone https://github.com/ocaml/ocaml examples/ocaml --single-branch --depth=1 --filter=blob:none
git clone https://github.com/ocaml/ocaml-lsp examples/ocaml-lsp --single-branch --depth=1 --filter=blob:none
git clone https://github.com/ocaml/opam examples/opam --single-branch --depth=1 --filter=blob:none
git clone https://github.com/ocaml-multicore/eio examples/eio --single-branch --depth=1 --filter=blob:none
git clone https://github.com/ocaml-ppx/ocamlformat examples/ocamlformat --single-branch --depth=1 --filter=blob:none
git clone https://github.com/ocaml-ppx/ppxlib examples/ppxlib --single-branch --depth=1 --filter=blob:none
git clone https://github.com/ocsigen/js_of_ocaml examples/js_of_ocaml --single-branch --depth=1 --filter=blob:none
git clone https://github.com/ocsigen/lwt examples/lwt --single-branch --depth=1 --filter=blob:none
git clone https://github.com/owlbarn/owl examples/owl --single-branch --depth=1 --filter=blob:none
- name: Run tests
uses: tree-sitter/parser-test-action@v1.2
with:
test-library: ${{runner.os == 'Linux'}}
corpus-files: |
examples/**/*.ml
examples/**/*.mli
invalid-files: |
examples/lablgtk/applications/osiris/osiris.ml
examples/lablgtk/examples/csview.ml
examples/lablgtk/tools/introspection/stubs/stubs_Atk.ml
examples/lablgtk/tools/introspection/stubs/stubs_Pango.ml
examples/lwt/src/unix/lwt_unix.cppo.ml
examples/lwt/src/unix/lwt_unix.cppo.mli
examples/merlin/tests/test-dirs/completion/infix.t/infix.ml
examples/merlin/tests/test-dirs/completion/parenthesize.t/parenthesize.ml
examples/merlin/tests/test-dirs/construct/c-modules.t/functor_app.ml
examples/merlin/tests/test-dirs/construct/c-modules.t/module.ml
examples/merlin/tests/test-dirs/errors/typing-after-parsing.t/test.ml
examples/merlin/tests/test-dirs/type-enclosing/issueLSP695.t/main.ml
examples/ocaml/stdlib/templates/float.template.mli
examples/ocaml/stdlib/templates/moreLabels.template.mli
examples/ocaml/testsuite/tests/generated-parse-errors/errors.ml
examples/ocaml/testsuite/tests/lexing/escape.ml
examples/ocaml/testsuite/tests/lexing/uchar_esc.ml
examples/ocaml/testsuite/tests/parse-errors/*
examples/ocaml/testsuite/tests/parsing/arrow_ambiguity.ml
examples/ocaml/testsuite/tests/parsing/constructor_declarations.ml
examples/ocaml/testsuite/tests/parsing/docstrings.ml
examples/ocaml/testsuite/tests/parsing/pr6604.ml
examples/ocaml/testsuite/tests/parsing/pr6604_2.ml
examples/ocaml/testsuite/tests/tool-toplevel/error_highlighting.ml
examples/ocaml/testsuite/tests/tool-toplevel/error_highlighting_use2.ml
examples/ocaml/testsuite/tests/tool-toplevel/error_highlighting_use3.ml
examples/ocaml/testsuite/tests/typing-misc/typecore_errors.ml
examples/ocaml/testsuite/tests/typing-sigsubst/sig_local_aliases_syntax_errors.ml
examples/ocaml/testsuite/tests/typing-warnings/pr7261.ml
examples/ocamlformat/test/failing/*/*
examples/ocamlformat/test/passing/*/*
examples/ocamlformat/test/rpc/big_margin/foo.ml
examples/ppxlib/astlib/astlib.ml
examples/ppxlib/astlib/location.ml
examples/ppxlib/astlib/longident.ml
examples/ppxlib/test/driver/non-compressible-suffix/test.ml
examples/ppxlib/test/expansion_helpers/mangle/test.ml
examples/ppxlib/test/ppx_import_support/test.ml
examples/ppxlib/test/quoter/test.ml
test-swift:
name: Test Swift binding
runs-on: macos-14
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Build
run: swift build
- name: Test
run: swift test
test-go:
name: Test Go binding
runs-on: ${{matrix.os}}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-14]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
cache-dependency-path: bindings/go/go.mod
- name: Get dependencies
working-directory: bindings/go
run: go get -t .
- name: Test
working-directory: bindings/go
run: go test