-
-
Notifications
You must be signed in to change notification settings - Fork 2
66 lines (50 loc) · 1.83 KB
/
test.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
luarocks:
name: Test LuaRocks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- uses: leafo/gh-actions-lua@35bcb06abec04ec87df82e08caa84d545348536e # v10.0.0
- uses: leafo/gh-actions-luarocks@e65774a6386cb4f24e293dca7fc4ff89165b64c5 # v4.3.0
- name: Setup
run: |
luarocks install --only-deps du-bundler-scm-0.rockspec
- name: Verify LuaRocks config
run: luarocks make
test:
name: Run Unit Tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# luaVersion: [ "5.3" ]
luaVersion: [ "5.1", "5.2", "5.3", "5.4" ]
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- uses: leafo/gh-actions-lua@35bcb06abec04ec87df82e08caa84d545348536e # v10.0.0
with:
luaVersion: ${{ matrix.luaVersion }}
- uses: leafo/gh-actions-luarocks@e65774a6386cb4f24e293dca7fc4ff89165b64c5 # tag=v4.3.0
- name: Setup
run: |
luarocks install --only-deps du-bundler-scm-0.rockspec
luarocks install luaunit
luarocks install luacov
luarocks install luafilesystem
mkdir test/results
- name: Test
run: lua -lluacov ./test/TestBundleTemplate.lua -o junit -n test/results/TestBundleTemplate.xml
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@283dea176069279a9076e77b548668a8e4f0c31b # v2.9.0
if: always()
with:
junit_files: "test/results/**/*.xml"
- name: Upload to Codecov
uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4
if: ${{ matrix.luaVersion == '5.3' }}