Skip to content

ci: migrate from Travis CI to GitHub Actions#6

Open
boolangery wants to merge 6 commits into
masterfrom
ci/github-actions
Open

ci: migrate from Travis CI to GitHub Actions#6
boolangery wants to merge 6 commits into
masterfrom
ci/github-actions

Conversation

@boolangery

Copy link
Copy Markdown
Owner

Problem

Travis CI is no longer functional for open-source projects. py-lua-style still used .travis.yml with Python 3.6/3.7.

Changes

  • Replace Travis CI with GitHub Actions workflows:
    • python-package.yml: install system deps (python3-dev, g++), Cythonize, build extension, and run pytest on Python 3.9–3.12
    • python-publish.yml: Cythonize + build + publish to PyPI on release

Modeled after the existing py-lua-parser workflows.

Travis CI is no longer functional for open-source projects.
- Replace .travis.yml with GitHub Actions workflows
- Install python3-dev and g++ for Cython extension compilation
- Test on Python 3.9-3.12
- Publish to PyPI on release
Token type constants completely changed in luaparser >=4.0
which switched to antlr4-based lexing. Updated all ~60 token
values to match LuaLexer constants from antlr4 runtime.

Also:
- Added STRING/NUMBER subtype variants (NORMALSTRING/CHARSTRING/LONGSTRING,
  INT/HEX/FLOAT/HEX_FLOAT) to ATOM_OP set
- Added STRING_TYPES set for multi-type string matching
- Removed broken import of luaparser.builder.Tokens (no longer exists)
- STRING checks in parse_tail now handle all string literal types
Several LuaLexer constant names don't match their runtime values:
- {/} are types 45/46 (not OB=47/CB=48)
- [/] are types 47/48 (not OCU=45/CCU=46)
- ~= is type 55 (SQEQ, not EE=49)
- == is type 49 (EE, single token in antlr4)
- = is type 2 (EQ, both assignment and equality char)
In antlr4 lexer, SPACE tokens are separate from NL tokens.
The render() function pushes indentation after each newline,
but empty lines (consecutive newlines) should not have indent
spaces. Pop the intermediate indent before rendering the
second newline.
The render() function pushes indentation after each newline,
but empty lines (consecutive newlines) should be indent-free.
Check after render() whether indent was injected between two
newlines and remove it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant