diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..498ee85 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,32 @@ +name: Test +on: + pull_request: + push: + branches: + - main +jobs: + main: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install Node + uses: actions/setup-node@v2 + with: + node-version: "14.x" + - name: Cache npm dependencies + uses: actions/cache@v2 + with: + path: ~/.npm + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- + - name: Install npm dependencies + run: npm ci + - name: Check formatting + run: npm run format-check + # Ensure the generated parser is up to date + - run: npx tree-sitter generate + - name: Run Tree-sitter tests + run: npx tree-sitter test + - name: Run integration tests + run: scripts/integration_test.sh diff --git a/README.md b/README.md index e9fbc47..c2a0134 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # tree-sitter-elixir -[![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) +[![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) Elixir grammar for [tree-sitter](https://github.com/tree-sitter/tree-sitter).