-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c4ec4c1
commit 7a486f2
Showing
1 changed file
with
15 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,30 @@ | ||
# When anything is pushed, install tree-sitter and run the command `tree-sitter generate && tree-sitter test` in the root directory of the repository. | ||
name: Tree-sitter Test | ||
|
||
on: | ||
[push] | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
env: | ||
TREE_SITTER_VERSION: v0.22.5 | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install dependencies | ||
run: sudo apt-get install -y libtree-sitter-dev | ||
|
||
- name: Install Tree-sitter | ||
- name: Download and Install Tree-sitter | ||
run: | | ||
git clone https://github.com/tree-sitter/tree-sitter.git | ||
cd tree-sitter | ||
make | ||
sudo make install | ||
wget https://github.com/tree-sitter/tree-sitter/releases/download/${{ env.TREE_SITTER_VERSION }}/tree-sitter-linux-x86.gz | ||
gunzip tree-sitter-linux-x86.gz | ||
chmod +x tree-sitter-linux-x86 | ||
sudo mv tree-sitter-linux-x86 /usr/local/bin/tree-sitter | ||
- name: Generate and Test | ||
run: | | ||
/usr/local/tree-sitter generate | ||
/usr/local/tree-sitter test | ||
/usr/local/bin/tree-sitter generate | ||
/usr/local/bin/tree-sitter test |