Update README.md #14
Workflow file for this run
This file contains 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: Run Tests and Code Coverage | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
jobs: | |
fail_if_pull_request_is_draft: | |
if: github.event.pull_request.draft == true | |
runs-on: ... | |
steps: | |
- name: Fails in order to indicate that pull request needs to be marked as ready to review and unit tests workflow needs to pass. | |
run: exit 1 | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
lua: [lua=5.1, lua=5.2, lua=5.3, lua=5.4, luajit=2.0, [email protected]] | |
steps: | |
# Checks-out the repository under $GITHUB_WORKSPACE. | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: '>=1.19' | |
- name: Install Lua (${{ matrix.lua }}) | |
run: | | |
pip install hererocks | |
hererocks -r^ --${{ matrix.lua }} lua_install | |
echo lua_install/bin >> $GITHUB_PATH | |
- name: Install toml-test | |
run: go install github.com/toml-lang/toml-test/cmd/[email protected] | |
- name: install depedencies | |
run: | | |
luarocks install lua-cjson | |
luarocks install luacov | |
luarocks install luacov-coveralls | |
- name: run toml-test with coverage | |
continue-on-error: true | |
run: | | |
toml-test -parallel 1 -- lua_install/bin/lua -lluacov spec/toml-test.lua | |
- name: Report test coverage | |
if: success() | |
continue-on-error: true | |
run: luacov-coveralls -e .luarocks | |
env: | |
COVERALLS_REPO_TOKEN: ${{ github.token }} | |