-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (43 loc) · 1.15 KB
/
tests.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Testing
on:
push:
branches: [ master ]
pull_request:
branches: [ master, dev ]
jobs:
# Run the tests
testing:
runs-on: ubuntu-latest
strategy:
matrix:
lua-version: ['5.1', '5.2', '5.3', 'luajit']
steps:
- uses: actions/checkout@v1
- uses: leafo/gh-actions-lua@v5
with:
luaVersion: ${{ matrix.lua-version }}
- uses: leafo/gh-actions-luarocks@v2
- name: Run tests
run: luarocks test
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: leafo/gh-actions-lua@v5
with:
luaVersion: "luajit"
- uses: leafo/gh-actions-luarocks@v2
- name: Install rocks
run: |
luarocks install luacov
luarocks install luaunit
luarocks install luacov-reporter-lcov
- name: Run tests
run: |
lua -lluacov tests/run.lua
luacov -c .luacov -v luacov.report.out -r lcov
- name: Upload to Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./luacov.report.out