Skip to content

Update bindings, tests, scanner, and workflows #56

Update bindings, tests, scanner, and workflows

Update bindings, tests, scanner, and workflows #56

Workflow file for this run

name: CI
on:
push:
branches: [main]
paths:
- grammar.js
- src/**
- test/**
- bindings/**
- binding.gyp
pull_request:
paths:
- grammar.js
- src/**
- test/**
- bindings/**
- binding.gyp
concurrency:
group: ${{github.workflow}}-${{github.ref}}
cancel-in-progress: true
jobs:
test-parser:
name: Test parser
runs-on: ${{matrix.os}}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-14]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up tree-sitter
uses: tree-sitter/setup-action/cli@v1
- name: Run parser and binding tests
uses: tree-sitter/parser-test-action@v2
with:
test-rust: true
- name: Parse sample files
uses: tree-sitter/parse-action@v4
id: parse-files
with:
files: bindings/r/**/*.R
- name: Upload failures artifact
uses: actions/upload-artifact@v4
if: "!cancelled() && steps.parse-files.outcome == 'failure'"
with:
name: failures-${{runner.os}}
path: ${{steps.parse-files.outputs.failures}}
test-r:
name: Test R bindings
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up R
uses: r-lib/actions/setup-r@v2
with:
working-directory: bindings/r
- name: Install dependencies
uses: r-lib/actions/setup-r-dependencies@v2
with:
working-directory: bindings/r
extra-packages: any::devtools
- name: Run tests
working-directory: bindings/r
shell: Rscript --vanilla {0}
run: |-
devtools::load_all()
devtools::test()