Skip to content

Commit b5b647d

Browse files
committed
adding ci action
1 parent cd3ca83 commit b5b647d

File tree

4 files changed

+41
-31
lines changed

4 files changed

+41
-31
lines changed

.github/workflows/ci.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: ci
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
TestMatrix:
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
lua-version: [ "5.5", "5.4", "5.3", "5.2", "5.1", "luajit" ]
15+
libflag: ["-shared --coverage"]
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- name: Clone repo
20+
uses: actions/checkout@main
21+
22+
- name: Install Lua
23+
uses: luarocks/gh-actions-lua@master
24+
with:
25+
luaVersion: ${{ matrix.lua-version }}
26+
27+
- name: Install Luarocks
28+
uses: luarocks/gh-actions-luarocks@master
29+
30+
- name: Install dependencies
31+
run: |
32+
luarocks install lpeglabel
33+
luarocks install luacov
34+
35+
- name: Run tests
36+
run: |
37+
lua -lluacov test.lua

.travis.yml

Lines changed: 0 additions & 29 deletions
This file was deleted.

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
lua-parser
22
==========
3-
[![Build Status](https://travis-ci.org/andremm/lua-parser.svg?branch=master)](https://travis-ci.org/andremm/lua-parser)
3+
[![Build Status](https://github.com/andremm/lua-parser/actions/workflows/ci.yml/badge.svg)](https://github.com/andremm/lua-parser/actions)
4+
[![Coverage Status](https://coveralls.io/repos/andremm/lua-parser/badge.png)](https://coveralls.io/r/andremm/lua-parser)
5+
[![License](http://img.shields.io/badge/Licence-MIT-brightgreen.svg)](LICENSE)
46

57
This is a Lua 5.3 parser written with [LPegLabel](https://github.com/sqmedeiros/lpeglabel) that
68
generates an AST in a format that is similar to the one specified by [Metalua](https://github.com/fab13n/metalua-parser).

test.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1824,7 +1824,7 @@ test.lua:3:3: syntax error, expected 'do' after the condition
18241824
r = parse(s)
18251825
assert(r == e)
18261826

1827-
print("> testing more syntax errors...")
1827+
print("> testing labels...")
18281828

18291829
-- ErrExtra
18301830
s = [=[

0 commit comments

Comments
 (0)