-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (45 loc) · 1.56 KB
/
busted.yml
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
44
45
46
47
48
49
50
name: Busted
on: [push, pull_request]
jobs:
busted:
strategy:
fail-fast: false
matrix:
lua_version:
[
"luajit-openresty",
"luajit-2.1.0-beta3",
"luajit-git",
"5.4.6",
"5.1.5",
"5.3.6",
]
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: ilammy/msvc-dev-cmd@v1
if: ${{ !startsWith(matrix.lua_version, 'luajit-') }}
- name: Setup ‘lua’
uses: jkl1337/gh-actions-lua@master
with:
luaVersion: ${{ matrix.lua_version }}
- name: Setup ‘luarocks’
uses: jkl1337/gh-actions-luarocks@master
- name: Setup dependencies
run: |
luarocks install busted
luarocks install luacov-coveralls
- name: Build C library
run: |
${{ matrix.os == 'ubuntu-latest' && 'FSANITIZE=1' || '' }} luarocks make --no-install
- name: Run busted tests
run: |
${{ matrix.os == 'ubuntu-latest' && 'LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libasan.so.6:/usr/lib/x86_64-linux-gnu/libstdc++.so.6:/usr/lib/x86_64-linux-gnu/libubsan.so.1' || '' }} busted -c -v
- name: Report test coverage
if: success() && !startsWith(matrix.os, 'windows-') && startsWith(matrix.lua_version, 'luajit-')
continue-on-error: true
run: luacov-coveralls -e .luarocks -e spec
env:
COVERALLS_REPO_TOKEN: ${{ github.token }}