-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: automated testing * fix lint check * Move busted config to file to allow for local runs too * move the root to all * pipeline update * split testing to it's own workflow * name * remove unneeded dep * Try to improve the pipeline * Job names * Merge workflow fiels * fix typo * add logic test * try to have some handling for files not on git * Remove now unneeded old style tests * Move Abbr to automated testing * Clean ups * Auto enable busted and luassert vscode addons * Remove unneeded custom path * undo last, is needed * typo * Move folder for currency * Clean the package change * Currency Tests plus stupid mediawiki mocking * remove print * name tests * Flags, rework mw handling * Page * Add `ustring` to mw defines * Fix flag testcases * add `varexists` * Fix comment * Handle bad input in flags.lua * Migrate variable tests, fix var sim * Migrate Locale tests * Migrate date tests * unused import
- Loading branch information
Showing
31 changed files
with
1,175 additions
and
757 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
return { | ||
_all = { | ||
verbose = true, | ||
helper = 'spec/test_helper.lua', | ||
}, | ||
default = { | ||
ROOT = {"spec"}, | ||
}, | ||
ci = { | ||
ROOT = {"spec"}, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,66 @@ | ||
name: Code Style | ||
name: Code Style and Unit Tests | ||
|
||
on: [pull_request, workflow_dispatch] | ||
|
||
jobs: | ||
test-lua: | ||
lua-code-style: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@master | ||
- name: Checkout | ||
uses: actions/checkout@master | ||
|
||
- uses: leafo/gh-actions-lua@v9 | ||
- name: Setup lua | ||
uses: leafo/gh-actions-lua@v9 | ||
with: | ||
luaVersion: "5.1" | ||
luaVersion: '5.1' | ||
|
||
- uses: leafo/gh-actions-luarocks@v4 | ||
- name: Setup luarock | ||
uses: leafo/gh-actions-luarocks@v4 | ||
|
||
- name: setup | ||
- name: Setup dependencies | ||
run: | | ||
luarocks install luacheck | ||
- name: test | ||
- name: Run lint | ||
run: | | ||
luacheck ./ | | ||
luacheck ./ --formatter=JUnit > report.xml | ||
- name: junit | ||
- name: Report lint | ||
uses: mikepenz/action-junit-report@v3 | ||
if: always() | ||
with: | ||
report_paths: 'report.xml' | ||
check_name: 'junit-report' | ||
annotate_notice: false | ||
check_name: 'Lint Report' | ||
|
||
lua-unit-test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@master | ||
|
||
- name: Setup lua | ||
uses: leafo/gh-actions-lua@v9 | ||
with: | ||
luaVersion: '5.1' | ||
|
||
- name: Setup luarocks | ||
uses: leafo/gh-actions-luarocks@v4 | ||
|
||
- name: Setup dependencies | ||
run: | | ||
luarocks install busted | ||
- name: Run test | ||
uses: lunarmodules/[email protected] | ||
with: | ||
args: --run=ci --output=junit > busted.xml | ||
|
||
- name: Report test | ||
uses: mikepenz/action-junit-report@v3 | ||
if: always() | ||
with: | ||
report_paths: 'busted.xml' | ||
check_name: 'Test Report' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.