Skip to content

Commit

Permalink
Fix CI/CD Pipeline (#1)
Browse files Browse the repository at this point in the history
* Update test-and-coverage.yml

* Update README.md
  • Loading branch information
FourierTransformer authored Oct 31, 2024
1 parent 876a176 commit ab457dc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/test-and-coverage.yml
Original file line number Diff line number Diff line change
@@ -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, [email protected]]
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
Expand All @@ -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/[email protected]
Expand All @@ -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()
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit ab457dc

Please sign in to comment.