ci: migrate from Travis CI to GitHub Actions#6
Open
boolangery wants to merge 6 commits into
Open
Conversation
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.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Travis CI is no longer functional for open-source projects. py-lua-style still used
.travis.ymlwith Python 3.6/3.7.Changes
Modeled after the existing py-lua-parser workflows.