Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
8a335ac
fix(ci): add Java 21 setup to workflow
Jan 30, 2026
c8f7c38
fix(ci): migrate Java publishing to Central Portal
Jan 30, 2026
2e2d0cc
ci: update gpg signature for java
jagalindo Jan 31, 2026
20f7358
ci: update gpg signature for java
jagalindo Jan 31, 2026
d820463
ci: update gpg signature for java
jagalindo Jan 31, 2026
2f72f26
fix: protecting the main branch and pr will create the new releases a…
jagalindo Jan 31, 2026
c7b36b8
feat: addind a basic test suite
jagalindo Feb 1, 2026
27d0b4f
fix: solve issues with python parser testsuite
jagalindo Feb 1, 2026
01d12a0
fix: fix testing issues
jagalindo Feb 1, 2026
37f714c
fix: fix testing issues
jagalindo Feb 1, 2026
0f42ec0
fix: fix testing issues
jagalindo Feb 1, 2026
5e60642
fix: fix testing issues
jagalindo Feb 1, 2026
8030d3a
fix: fix testing issues
jagalindo Feb 1, 2026
860ffae
fix: fix testing issues
jagalindo Feb 1, 2026
6073d54
fix: fix testing issues
jagalindo Feb 1, 2026
11db188
fix: fix testing issues
jagalindo Feb 1, 2026
a84e847
fix: fix testing issues
jagalindo Feb 1, 2026
0553f6b
chore: bump version to 2.5.0
jagalindo Feb 18, 2026
2c527d3
chore: bump Java and JS versions to 2.5.0
jagalindo Feb 18, 2026
f2dd4ae
fix: updating node action to avoid the token use
jagalindo Feb 19, 2026
48df88f
fix: correcting issue with antlr
jagalindo Feb 19, 2026
b929585
fix: correcting issue with node
jagalindo Feb 19, 2026
6ce16f3
fix: update permissions to ensure contents are readable
Feb 19, 2026
96d49aa
fix: update Node.js version to 24 in workflow
Feb 19, 2026
6cec051
fix: add repository information to package.json
Feb 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<server>
<id>ossrh</id>
<id>central</id>
<username>${env.SONATYPE_USERNAME}</username>
<password>${env.SONATYPE_PASSWORD}</password>
</server>
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/conventionalpr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ jobs:
conventional_commit:
name: Conventional Commits
runs-on: ubuntu-latest
permissions:
pull-requests: read
steps:
- uses: actions/checkout@v2
- uses: webiny/action-conventional-commits@v1.0.3
- uses: webiny/action-conventional-commits@v1.3.0
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
65 changes: 44 additions & 21 deletions .github/workflows/java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build and Deploy Java Parser

on:
push:
branches: [develop]
branches: [develop, main]
tags: ['v*']

jobs:
Expand All @@ -13,17 +13,33 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Install ANTLR4 and Maven
- name: Set up Java 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
server-id: central
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE

- name: Configure GPG for batch mode
run: |
sudo apt-get update
sudo apt-get install -y maven
make dev
echo "allow-loopback-pinentry" >> ~/.gnupg/gpg-agent.conf
echo "pinentry-mode loopback" >> ~/.gnupg/gpg.conf
gpgconf --kill gpg-agent

- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
- name: Verify GPG key
run: |
gpg --list-secret-keys
echo "Testing GPG signing..."
echo "test" | gpg --batch --pinentry-mode loopback --passphrase "$MAVEN_GPG_PASSPHRASE" --clearsign > /dev/null && echo "GPG signing works!"
env:
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}

- name: Install ANTLR4
run: make dev

- name: Set SNAPSHOT version (develop branch)
if: github.ref == 'refs/heads/develop'
Expand All @@ -32,6 +48,13 @@ jobs:
BASE_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout | sed 's/-SNAPSHOT//')
mvn versions:set -DnewVersion="${BASE_VERSION}-SNAPSHOT" -DgenerateBackupPoms=false

- name: Set release version (main branch)
if: github.ref == 'refs/heads/main'
run: |
cd java
BASE_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout | sed 's/-SNAPSHOT//')
mvn versions:set -DnewVersion="${BASE_VERSION}" -DgenerateBackupPoms=false

- name: Set release version (tag)
if: startsWith(github.ref, 'refs/tags/v')
run: |
Expand All @@ -49,18 +72,18 @@ jobs:
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2

- name: Deploy SNAPSHOT to OSSRH (develop branch)
- name: Deploy SNAPSHOT to Sonatype Snapshots
if: github.ref == 'refs/heads/develop'
run: cd java && mvn clean deploy --settings ../.github/settings.xml
run: cd java && mvn clean deploy -DskipCentralPublishing=true
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
MAVEN_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}

- name: Deploy Release to Maven Central (tag)
if: startsWith(github.ref, 'refs/tags/v')
run: cd java && mvn clean deploy --settings ../.github/settings.xml
- name: Deploy Release to Central Portal
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')
run: cd java && mvn clean deploy
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
MAVEN_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
22 changes: 14 additions & 8 deletions .github/workflows/js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@ name: Build and Deploy JS Parser

on:
push:
branches: [develop]
branches: [develop, main]
tags: ['v*']

jobs:
build:
runs-on: ubuntu-latest
permissions:
id-token: write # Required for OIDC trusted publishing
contents: read

steps:
- name: Checkout code
Expand All @@ -16,7 +19,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 24
registry-url: https://registry.npmjs.org/

- name: Install ANTLR4
Expand All @@ -33,9 +36,14 @@ jobs:
cd js
npm version --no-git-tag-version "$(node -p "require('./package.json').version")-dev.${GITHUB_RUN_NUMBER}"
echo "Publishing version: $(node -p "require('./package.json').version")"
npm publish --tag dev --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
npm publish --tag dev --access public --provenance

- name: Set release version and publish (main branch)
if: github.ref == 'refs/heads/main'
run: |
cd js
echo "Publishing version: $(node -p "require('./package.json').version")"
npm publish --access public --provenance

- name: Set release version and publish (tag)
if: startsWith(github.ref, 'refs/tags/v')
Expand All @@ -44,6 +52,4 @@ jobs:
TAG_VERSION=${GITHUB_REF_NAME#v}
npm version --no-git-tag-version "${TAG_VERSION}"
echo "Publishing version: ${TAG_VERSION}"
npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
npm publish --access public --provenance
9 changes: 8 additions & 1 deletion .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build and Deploy Python Parser

on:
push:
branches: [develop]
branches: [develop, main]
tags: ['v*']

jobs:
Expand Down Expand Up @@ -31,6 +31,13 @@ jobs:
sed -i "s/version=\"[^\"]*\"/version=\"${DEV_VERSION}\"/" setup.py
echo "Publishing version: ${DEV_VERSION}"

- name: Set release version (main branch)
if: github.ref == 'refs/heads/main'
run: |
cd python
BASE_VERSION=$(grep -oP 'version="\K[0-9]+\.[0-9]+\.[0-9]+' setup.py)
echo "Publishing version: ${BASE_VERSION}"

- name: Set release version (tag)
if: startsWith(github.ref, 'refs/tags/v')
run: |
Expand Down
84 changes: 84 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: Run Grammar Tests

on:
push:
branches: ['*']
pull_request:
branches: [develop, main]

jobs:
test-javascript:
runs-on: ubuntu-latest
defaults:
run:
working-directory: js
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 20

- name: Install ANTLR4
run: cd .. && make dev

- name: Build grammar
run: cd .. && make js_parser

- name: Install dependencies
run: npm install

- name: Run tests
run: npm test

test-python:
runs-on: ubuntu-latest
defaults:
run:
working-directory: python
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Install ANTLR4
run: cd .. && make dev

- name: Build grammar
run: cd .. && make python_parser

- name: Install dependencies
run: |
pip install antlr4-python3-runtime==4.13.2
pip install -r requirements-dev.txt

- name: Run tests
run: PYTHONPATH=. pytest test_grammar.py -v

test-java:
runs-on: ubuntu-latest
defaults:
run:
working-directory: java
steps:
- uses: actions/checkout@v4

- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'

- name: Install ANTLR4
run: cd .. && make dev

- name: Cache Maven packages
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2

- name: Run tests
run: mvn test
59 changes: 46 additions & 13 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,21 +1,54 @@
# VSCode, Eclipse, and IntelliJ IDEA project files
.vscode
.settings
# OS files
.DS_Store
Thumbs.db

# IDEs and editors
.vscode/
.settings/
.classpath
.project
.idea
.idea/
*.iml
*.swp
*.swo
*~

# Java
target/
*.class
*.jar
*.war
.antlr/

# Python virtual environments
env
build
python/uvl/__pycache__
# Python
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
env/
venv/
.venv/
build/
dist/
*.egg-info/
.eggs/
.pytest_cache/
.coverage
htmlcov/
python/uvl/*
!python/uvl/__init__.py
!python/uvl/UVLCustomLexer.py

# Node.js
js/node_modules
# JavaScript
node_modules/
js/node_modules/
js/package-lock.json
js/src/lib/
*.log
npm-debug.log*

# Java build files
.antlr/
target/
# Environment files
.env
.env.local
.env.*.local
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ java_parser:
js_parser:
mkdir -p $(JAVASCRIPT_OUTPUT_DIR)
cd uvl/JavaScript && \
antlr4 $(LIB_FLAG) $(ROOT_DIR)/$(LIB_PATH) -Dlanguage=JavaScript -o $(ROOT_DIR)/$(JAVASCRIPT_OUTPUT_DIR) UVLJavaScriptLexer.g4 UVLJavaScriptParser.g4
ANTLR4_TOOLS_ANTLR_VERSION=4.13.2 antlr4 $(LIB_FLAG) $(ROOT_DIR)/$(LIB_PATH) -Dlanguage=JavaScript -o $(ROOT_DIR)/$(JAVASCRIPT_OUTPUT_DIR) UVLJavaScriptLexer.g4 UVLJavaScriptParser.g4

python_parser:
cd uvl/Python && \
antlr4 $(LIB_FLAG) $(ROOT_DIR)/$(LIB_PATH) -Dlanguage=Python3 -o $(ROOT_DIR)/$(PYTHON_OUTPUT_DIR) UVLPythonLexer.g4 UVLPythonParser.g4
ANTLR4_TOOLS_ANTLR_VERSION=4.13.2 antlr4 $(LIB_FLAG) $(ROOT_DIR)/$(LIB_PATH) -Dlanguage=Python3 -o $(ROOT_DIR)/$(PYTHON_OUTPUT_DIR) UVLPythonLexer.g4 UVLPythonParser.g4

python_prepare_package:
cd python && python3 -m build
Expand Down
Loading