From 51a902686af26e72849eba9dcfc29c237396854c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ton=C4=87i=20Gali=C4=87?= Date: Mon, 8 Feb 2021 11:00:04 +0100 Subject: [PATCH] chore: enable github CI (#7) --- .github/workflows/build.yml | 31 +++++++++++++++++++++++++++++++ package.json | 5 +++-- 2 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..f5efd5c --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,31 @@ +name: build + +on: + push: + pull_request: + branches: + - "**:**" # For forks + +jobs: + test: + name: Run tests + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Setup Node + uses: actions/setup-node@v2-beta + with: + node-version: "12" + + - name: Display Node versions + run: | + node --version + npm --version + + - name: Install dependencies + run: npm install + + - name: Test corpus & parse examples + run: npm run test diff --git a/package.json b/package.json index c8bbdd8..cdd88de 100644 --- a/package.json +++ b/package.json @@ -4,13 +4,14 @@ "description": "Tree Parser support for Erlang", "scripts": { "gen": "tree-sitter generate", - "parse": "tree-sitter parse" + "parse": "tree-sitter parse", + "test": "yarn run gen && tree-sitter test" }, "author": "Leandro Ostera ", "license": "Apache-2.0", "dependencies": { "nan": "^2.14.1", "prettier": "^2.2.1", - "tree-sitter-cli": "^0.17.1" + "tree-sitter-cli": "^0.17.3" } }