Skip to content
Draft
Changes from all commits
Commits
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
53 changes: 53 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: ci
on:
push:
pull_request:
workflow_dispatch:
jobs:
pytest:
strategy:
fail-fast: false # https://github.com/actions/runner-images#available-images
matrix: # https://github.com/actions/python-versions/releases
os: [ubuntu-26.04] # , ubuntu-26.04-arm, macos-latest, macos-26-intel, windows-latest, windows-11-arm]
# python-version: ["3.10", "3.12", "3.14", "3.14t", "3.15", "pypy-3.11"]
python-version: [3.x]
runs-on: ${{ matrix.os }}
steps:
#- uses: leafo/gh-actions-lua@v13
# with:
# luaVersion: 5.1.5 # https://www.lua.org/versions.html
#- uses: leafo/gh-actions-luarocks@v6
- if: runner.os == 'macOS'
run: |
brew install pkg-config luarocks
echo "PKG_CONFIG_PATH=$(brew --prefix lua)/lib/pkgconfig" >> "$GITHUB_ENV"
echo "LUA_DIR=$(brew --prefix lua)" >> "$GITHUB_ENV"
- if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y lua5.1 liblua5.1-0-dev luarocks
- run: lua -h || lua -v
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- run: pip install --upgrade pip
- env:
PYTHON_LIBRT: "amd64" # "x64"
run: pip install --editable . || true # TODO: Always fails even if $PYTHON_LIBRT is defined
- run: luarocks install lunatic-python || true # TODO: Always fails! luarocks: command not found
# - run: pip install lunatic-python || true # Install from PyPI -- Always fails!
- run: pip install lunatic-python-universal # Install from PyPI
- shell: python # Sanity check
run: |
import lua
lg = lua.globals()
print(f"{type(lg) = }")
print(f"{type(lg.string) = }")
print(f"{type(lg.string.lower) = }")
print(f"{lg.string.lower('Hello world!') = }")
- run: python tests/test_lua.py || true # Segmentation fault (core dumped)
- run: pip install pytest
- run: pytest || true # TODO: Write some pytests
- run: pytest --doctest-modules || true # TODO: Write some pytests