diff --git a/.github/workflows/test-and-coverage.yml b/.github/workflows/test-and-coverage.yml index 9ec0f7a..73a1677 100644 --- a/.github/workflows/test-and-coverage.yml +++ b/.github/workflows/test-and-coverage.yml @@ -1,13 +1,16 @@ name: Run Tests and Code Coverage -on: [push, pull_request] +on: + push: + branches: [ main ] + pull_request: jobs: test: runs-on: ubuntu-latest strategy: matrix: - luaVersion: [lua=5.1, lua=5.2, lua=5.3, lua=5.4, luajit=2.0, luajit=@v2.1.ROLLING] + lua: [lua=5.1, lua=5.2, lua=5.3, lua=5.4, luajit=2.0, luajit=@v2.1.ROLLING] steps: # Checks-out the repository under $GITHUB_WORKSPACE. - uses: actions/checkout@v4 @@ -18,7 +21,8 @@ jobs: - name: Install Lua (${{ matrix.lua }}) run: | pip install hererocks - hererocks lua_install -r^ --${{ matrix.lua }} + 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/toml-test@v1.5.0 @@ -29,8 +33,10 @@ jobs: luarocks install luacov luarocks install luacov-coveralls - - name: run unit tests with coverage - run: toml-test lua -llcov spec/test-runner.lua + - 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() diff --git a/README.md b/README.md index 6c2ded0..841478a 100644 --- a/README.md +++ b/README.md @@ -1 +1,2 @@ # tinytoml +[![Run Tests and Code Coverage](https://github.com/FourierTransformer/tinytoml/actions/workflows/test-and-coverage.yml/badge.svg)](https://github.com/FourierTransformer/tinytoml/actions/workflows/test-and-coverage.yml) [![Coverage Status](https://coveralls.io/repos/github/FourierTransformer/tinytoml/badge.svg?branch=refs/pull/1/merge)](https://coveralls.io/github/FourierTransformer/tinytoml?branch=refs/pull/1/merge)