-
-
Notifications
You must be signed in to change notification settings - Fork 2
111 lines (83 loc) · 3.12 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
name: Test
on:
push:
branches: [ main, pts ]
pull_request:
branches: [ main ]
jobs:
luarocks:
name: Test LuaRocks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- 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-mocks-scm-0.rockspec
- name: Verify LuaRocks config
run: luarocks make
ldoc:
name: Test LDoc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- 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-mocks-scm-0.rockspec
luarocks install ldoc
- name: Verify codex builds cleanly
run: ldoc . --fatalwarnings
- name: Verify PTS codex builds cleanly
run: ldoc -c config-pts.ld . --fatalwarnings
unit-test:
name: Run Unit Tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# luaVersion: [ "5.3" ]
luaVersion: [ "5.3", "5.4" ]
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: leafo/gh-actions-lua@35bcb06abec04ec87df82e08caa84d545348536e # v10.0.0
with:
luaVersion: ${{ matrix.luaVersion }}
- uses: leafo/gh-actions-luarocks@e65774a6386cb4f24e293dca7fc4ff89165b64c5 # v4.3.0
- name: Setup
run: |
luarocks install --only-deps du-mocks-scm-0.rockspec
luarocks install luaunit
luarocks install luacov
luarocks install luafilesystem
- name: Test
run: ./test/runTests.sh -o junit
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@30eadd5010312f995f0d3b3cff7fe2984f69409e # v2.16.1
if: always()
with:
junit_files: "test/results/**/*.xml"
- run: luacov
- name: Upload to Codecov
uses: codecov/codecov-action@ab904c41d6ece82784817410c45d8b8c02684457 # v3.1.6
if: ${{ matrix.luaVersion == '5.3' }}
- name: Export In-Game Tests
run: ./test/exportAll.sh
- name: Upload Test Artifacts
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
if: ${{ matrix.luaVersion == '5.3' }}
with:
name: test_configs
path: |
test/configExports
test/results/*.html
- run: rm -f test/results/*.xml
- name: Deploy Screen Renderer Output
uses: JamesIves/github-pages-deploy-action@ec9c88baef04b842ca6f0a132fd61c762aa6c1b0 # v4.6.0
if: ${{ matrix.luaVersion == '5.3' && (github.event_name == 'push' && github.ref_name == 'main') }}
with:
branch: codex
folder: test/results
target-folder: test-results