Add CI workflow #10
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
| name: CI | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| workflow_dispatch: | |
| env: | |
| LUA_VERSION: "5.4.7" | |
| jobs: | |
| tests: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: pandoc/core:3.7.0.2 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Verify pandoc installation | |
| run: | | |
| pandoc --version | |
| - name: Ensure pandoc supports dynamic loading of C libraries | |
| run: | | |
| ldd $(which pandoc) | |
| - name: Install lua | |
| run: | | |
| cd /tmp | |
| curl -R -O https://www.lua.org/ftp/lua-${{ env.LUA_VERSION }}.tar.gz | |
| tar zxf lua-${{ env.LUA_VERSION }}.tar.gz | |
| cd lua-${{ env.LUA_VERSION }} | |
| make linux | |
| sudo make install | |
| - name: Install luarocks | |
| run: | | |
| cd /tmp | |
| git clone https://github.com/luarocks/luarocks.git | |
| cd luarocks | |
| ./configure --lua-version=5.4 \ | |
| --with-lua=/usr/local \ | |
| --prefix=/usr/local | |
| make | |
| sudo make install | |
| - name: Install luarocks modules | |
| run: | | |
| luarocks config local_by_default true | |
| luarocks install busted | |
| luarocks install luacov | |
| luarocks install cluacov | |
| luarocks install ansicolors | |
| - name: Run tests | |
| run: | | |
| ./test.lua |