-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #278 from Bridgeconn/version-3
Version 3
- Loading branch information
Showing
1,225 changed files
with
412,251 additions
and
233,874 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
[bumpversion] | ||
current_version = 3.0.0-beta.16 | ||
commit = True | ||
tag = False | ||
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)\-(?P<release>\w+).(?P<num>\d+) | ||
serialize = | ||
{major}.{minor}.{patch}-{release}.{num} | ||
{major}.{minor}.{patch} | ||
|
||
[bumpversion:part:release] | ||
values = | ||
alpha | ||
beta | ||
|
||
[bumpversion:file:py-usfm-parser/setup.py] | ||
search = version="{current_version}" | ||
replace = version="{new_version}" | ||
|
||
[bumpversion:file:py-usfm-parser/pyproject.toml] | ||
|
||
[bumpversion:file:py-usfm-parser/src/usfm_grammar/__init__.py] | ||
search = __version__ = "{current_version}" | ||
replace = __version__ = "{new_version}" | ||
|
||
[bumpversion:file:py-usfm-parser/requirements.txt] | ||
search = tree-sitter-usfm3=={current_version} | ||
replace = tree-sitter-usfm3=={new_version} | ||
|
||
[bumpversion:file:tree-sitter-usfm3/pyproject.toml] | ||
search = version = "{current_version}" | ||
replace = version = "{new_version}" | ||
|
||
[bumpversion:file:tree-sitter-usfm3/package.json] | ||
search = "version": "{current_version}" | ||
replace = "version": "{new_version}" | ||
|
||
[bumpversion:file:tree-sitter-usfm3/package-lock.json] | ||
search = "version": "{current_version}" | ||
replace = "version": "{new_version}" | ||
|
||
[bumpversion:file:node-usfm-parser/package.json] | ||
|
||
[bumpversion:file:web-usfm-parser/package.json] | ||
search = "version": "{current_version}" | ||
replace = "version": "{new_version}" | ||
|
||
[bumpversion:file:web-usfm-parser/README.md] | ||
search = npm/usfm-grammar-web@{current_version} | ||
replace = npm/usfm-grammar-web@{new_version} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,136 @@ | ||
name: Check-on-push | ||
name: Test-on-push | ||
|
||
# Run this workflow every time a new commit pushed to your repository | ||
on: | ||
push: | ||
pull_request: | ||
branches: | ||
- master | ||
- dev | ||
on: [push, pull_request ] | ||
# push: | ||
# pull_request: | ||
# branches: | ||
# - master | ||
# - version-3 | ||
|
||
jobs: | ||
# Set the job key. The key is displayed as the job name | ||
# when a job name is not provided | ||
Run-linter-and-tests: | ||
Run-Grammar-tests: | ||
# Name the Job | ||
name: Lint n test | ||
name: Run Grammar tests | ||
# Set the type of machine to run on | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# Checks out a copy of your repository on the ubuntu-latest machine | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v4 | ||
- name: Setup node and npm | ||
uses: actions/setup-node@v2 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 14 | ||
- name: install packages | ||
run: npm install . | ||
# Runs the Linter action | ||
- name: Run Linter | ||
run: npm run lint | ||
# Run testcases | ||
node-version: 20 | ||
- name: Run tests | ||
run: npm run test-on-github | ||
|
||
run: | | ||
cd tree-sitter-usfm3 | ||
npm install --save nan | ||
npm install --save-dev tree-sitter-cli | ||
./node_modules/.bin/tree-sitter generate | ||
./node_modules/.bin/tree-sitter test | ||
Run-Python-tests: | ||
name: Run Python tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10.6' | ||
|
||
- name: Setup node and npm | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Build grammar binary | ||
run: | | ||
cd tree-sitter-usfm3 | ||
npm install --save nan | ||
npm install --save-dev tree-sitter-cli | ||
./node_modules/.bin/tree-sitter generate | ||
- name: Install dependencies | ||
run: | | ||
cd tree-sitter-usfm3 | ||
pip install . | ||
cd ../py-usfm-parser | ||
sed -i '/tree-sitter-usfm3==.*/d' pyproject.toml | ||
pip install . -r ./dev-requirements.txt | ||
# - name: Install python module | ||
# run: | | ||
# cd py-usfm-parser | ||
# pip install . | ||
|
||
- name: Run tests for parsing errors | ||
working-directory: ./py-usfm-parser | ||
run: | ||
# pytest -k "not compare_usx_with_testsuite_samples and not testsuite_usx_with_rnc_grammar and not samples-from-wild and not 57-TIT.partial" -n auto | ||
python -m pytest -k "not compare_usx_with_testsuite_samples and not testsuite_usx_with_rnc_grammar and not generated_usx_with_rnc_grammar and not samples-from-wild" -n auto | ||
|
||
Run-Node-tests: | ||
name: Run Node tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Setup node and npm | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
- name: Build grammar | ||
run: | | ||
cd tree-sitter-usfm3 | ||
npm install --save nan | ||
npm install --save-dev tree-sitter-cli | ||
./node_modules/.bin/tree-sitter generate | ||
- name: Install dependencies | ||
run: | | ||
cd node-usfm-parser | ||
sed -i '/"tree-sitter-usfm3":.*/d' package.json | ||
npm install . | ||
npm install ../tree-sitter-usfm3 | ||
- name: Run tests | ||
run: | | ||
cd node-usfm-parser | ||
node_modules/mocha/bin/mocha.js --timeout=40000 --grep "Include|Exclude|wild|Compare" --invert | ||
Run-Web-tests: | ||
name: Run Web tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Setup node and npm | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
- name: Build grammar | ||
run: | | ||
cd tree-sitter-usfm3 | ||
npm install --save nan | ||
npm install --save-dev tree-sitter-cli | ||
./node_modules/.bin/tree-sitter generate | ||
./node_modules/.bin/tree-sitter build --wasm | ||
- name: Install dependencies | ||
run: | | ||
cd web-usfm-parser | ||
npm install . | ||
cp node_modules/web-tree-sitter/tree-sitter.js src/web-tree-sitter/ | ||
cp node_modules/web-tree-sitter/tree-sitter.wasm ./ | ||
cp ../tree-sitter-usfm3/tree-sitter-usfm3.wasm ./tree-sitter-usfm.wasm | ||
- name: Run tests | ||
run: | | ||
cd web-usfm-parser | ||
node_modules/mocha/bin/mocha.js --timeout=40000 --grep "Include|Exclude|wild|Compare" --invert | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.