Skip to content

React support with seperate usfm-grammar-web #130

React support with seperate usfm-grammar-web

React support with seperate usfm-grammar-web #130

Workflow file for this run

name: check-linting
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on: [push, pull_request ]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains the linting for python module
python-build-n-lint:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.10.6' # Version range or exact version of a Python version to use, using SemVer's version range syntax
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
- name: Create Virtual Environment
run: python -m venv ENV-dev
- name: Use VENV
run: source ENV-dev/bin/activate
- name: install packages
working-directory: ./py-usfm-parser
run: pip install -r dev-requirements.txt
- name: Setup node and npm
uses: actions/setup-node@v4
with:
node-version: 20
- name: Build grammar binary
working-directory: ./tree-sitter-usfm3
run: |
npm install --save nan
npm install --save-dev tree-sitter-cli
./node_modules/.bin/tree-sitter generate
- name: install tree-sitter-usfm3
working-directory: ./tree-sitter-usfm3
run: pip install .
- name: Run linter
working-directory: ./py-usfm-parser
run: pylint --extension-pkg-allow-list=lxml src/usfm_grammar/*.py