Skip to content

ci: update workflows #286

ci: update workflows

ci: update workflows #286

Workflow file for this run

name: CI
on:
push:
branches: [master]
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:
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: Set up examples
shell: sh
run: |-
git clone https://github.com/Bash-it/bash-it examples/bash-it -q --single-branch --depth=1
git clone https://git.savannah.gnu.org/git/bash.git examples/bash -q --single-branch --depth=1
git clone https://anongit.gentoo.org/git/repo/gentoo.git examples/gentoo -q --single-branch --depth=1
if [[ $RUNNER_OS != Windows ]]; then
git clone https://github.com/oilshell/wild-corpus examples/wild-corpus -q --single-branch --depth=1
else
sed -i script/example-files.txt -e '/wild-corpus/d'
sed -i script/known-failures.txt -e '/wild-corpus/d'
fi
- name: Run tests
uses: tree-sitter/parser-test-action@v2
with:
test-rust: ${{runner.os == 'Linux'}}
- name: Parse examples
uses: tree-sitter/parse-action@v4
with:
files-list: script/example-files.txt
invalid-files-list: script/known-failures.txt