Repository navigation
Fixes for broken master, trust-based source selection, module split, feed discovery & caching, sectioned config, and release tooling #23
Workflow file for this run
This file contains hidden or 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
| name: Tests | |
| on: | |
| pull_request: | |
| branches: | |
| - 'master' | |
| workflow_dispatch: | |
| inputs: | |
| ref: | |
| description: 'Release tag or branch to scan.' | |
| required: true | |
| default: 'master' | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| ref: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.ref || github.ref }} | |
| - uses: leafo/gh-actions-lua@v13 | |
| with: | |
| luaVersion: "luajit-2.1.0-beta3" | |
| # DepCtrl relies on Lua 5.2 features (table.unpack, __pairs/__len) | |
| luaCompileFlags: "XCFLAGS=-DLUAJIT_ENABLE_LUA52COMPAT" | |
| - uses: leafo/gh-actions-luarocks@v6 | |
| # moonscript loader | |
| - run: luarocks install moonscript | |
| # lfs (Aegisub provides an internal copy) | |
| - run: luarocks install luafilesystem | |
| # CLI argument parsing | |
| - run: luarocks install argparse | |
| # mock HTTP server dependencies | |
| - run: luarocks install luasocket | |
| - run: luarocks install copas | |
| - run: luarocks install pegasus | |
| # json schema validation | |
| - run: luarocks install lua-schema | |
| - run: luarocks install lpeg | |
| - name: Run tests | |
| timeout-minutes: 5 | |
| run: lua depctrl.lua test | |
| - name: Publish test report | |
| uses: ctrf-io/github-test-reporter@v1 | |
| if: ${{ !cancelled() }} | |
| with: | |
| report-path: ./ctrf/*.json | |
| pull-request: ${{ github.event_name == 'pull_request' && true || false }} | |
| overwrite-comment: ${{ github.event_name == 'pull_request' && true || false }} | |
| annotate: false | |
| use-suite-name: true | |
| status-check: true | |
| summary-report: true | |
| failed-report: true | |
| upload-artifact: true | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| # Lint the module sources' LuaCATS annotations: missing docs on public members and | |
| # @param/@return that disagree with the real signature fail the build. This also emits every | |
| # definition and verifies it is loadable Lua, so it doubles as type-generation coverage. | |
| - name: Check annotations | |
| if: ${{ !cancelled() }} | |
| run: lua depctrl.lua generate-types --check | |
| # Smoke-test that documentation generation runs over the real feed without a parse or emit | |
| # failure. --site none skips scaffolding; the output goes to a throwaway directory. | |
| - name: Smoke-test doc generation | |
| if: ${{ !cancelled() }} | |
| run: lua depctrl.lua generate-docs --site none -o "$RUNNER_TEMP/docs" |