Skip to content

Commit 8f1f7bc

Browse files
committed
Add test workflow
1 parent e846449 commit 8f1f7bc

File tree

2 files changed

+33
-1
lines changed

2 files changed

+33
-1
lines changed

.github/workflows/test.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Test
2+
on:
3+
pull_request:
4+
push:
5+
branches:
6+
- main
7+
jobs:
8+
main:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- name: Install Node
13+
uses: actions/setup-node@v2
14+
with:
15+
node-version: "14.x"
16+
- name: Cache npm dependencies
17+
uses: actions/cache@v2
18+
with:
19+
path: ~/.npm
20+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
21+
restore-keys: |
22+
${{ runner.os }}-node-
23+
- name: Install npm dependencies
24+
run: npm ci
25+
- name: Check formatting
26+
run: npm run format-check
27+
# Ensure the generated parser is up to date
28+
- run: npx tree-sitter generate
29+
- name: Run Tree-sitter tests
30+
run: npx tree-sitter test
31+
- name: Run integration tests
32+
run: scripts/integration_test.sh

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# tree-sitter-elixir
22

3-
[![Test](https://github.com/jonatanklosko/tree-sitter-elixir/actions/workflows/test.yml/badge.svg)](https://github.com/jonatanklosko/tree-sitter-elixir/actions/workflows/test.yml)
3+
[![Test](https://github.com/elixir-lang/tree-sitter-elixir/actions/workflows/test.yml/badge.svg)](https://github.com/elixir-lang/tree-sitter-elixir/actions/workflows/test.yml)
44

55
Elixir grammar for [tree-sitter](https://github.com/tree-sitter/tree-sitter).
66

0 commit comments

Comments
 (0)