Skip to content

add tests

add tests #22

Workflow file for this run

name: Node.js CI
on:
push:
branches:
- '*'
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x, 18.x, 20.x, 21.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Install ANTLR
run: |
curl -O https://www.antlr.org/download/antlr-4.13.1-complete.jar
echo "java -jar $(pwd)/antlr-4.13.1-complete.jar \$@" > antlr4
chmod +x antlr4
echo "$(pwd)" >> $GITHUB_PATH
- name: Generate ANTLR Source Files
run: antlr4 -Dlanguage=TypeScript FarmExpr.g4 -visitor -o lang
- name: Install dependencies
run: yarn install
- name: Compile TypeScript
run: yarn tsc
- name: Run linter
run: yarn lint
- name: Run prettier check
run: yarn pretty --check
- name: Run all tests with coverage
run: yarn cover