mirror of
https://github.com/ArduPilot/ardupilot.git
synced 2026-10-06 19:00:27 +08:00
Bumps the github-actions group with 1 update: [actions/checkout](https://github.com/actions/checkout). Updates `actions/checkout` from 5 to 6 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v5...v6) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions ... Signed-off-by: dependabot[bot] <support@github.com>
93 lines
3.0 KiB
YAML
93 lines
3.0 KiB
YAML
name: test scripting
|
|
|
|
on:
|
|
push:
|
|
paths: # only run for scripting changes
|
|
- 'libraries/AP_Scripting/tests/docs_check.py'
|
|
- 'libraries/AP_Scripting/generator/**'
|
|
- '**.lua'
|
|
- 'Tools/scripts/run_lua_language_check.py'
|
|
- 'Tools/scripts/run_luacheck.sh'
|
|
|
|
pull_request:
|
|
paths: # only run for scripting changes
|
|
- 'libraries/AP_Scripting/tests/docs_check.py'
|
|
- 'libraries/AP_Scripting/generator/**'
|
|
- '**.lua'
|
|
- 'Tools/scripts/run_lua_language_check.py'
|
|
- 'Tools/scripts/run_luacheck.sh'
|
|
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: ci-${{github.workflow}}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
test-scripting:
|
|
runs-on: ubuntu-22.04
|
|
container: ardupilot/ardupilot-dev-base:v0.1.3
|
|
steps:
|
|
# git checkout the PR
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
submodules: 'recursive'
|
|
|
|
- name: Register lua check problem matcher
|
|
run: |
|
|
echo "::add-matcher::.github/problem-matchers/Lua.json"
|
|
echo "::remove-matcher owner=Lua-language-server-problem-matcher::"
|
|
|
|
- name: Lua Linter
|
|
shell: bash
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get -y install lua-check
|
|
./Tools/scripts/run_luacheck.sh
|
|
|
|
- name: Register lua language server problem matcher
|
|
run: |
|
|
echo "::add-matcher::.github/problem-matchers/Lua.json"
|
|
echo "::remove-matcher owner=Luacheck-problem-matcher::"
|
|
|
|
- name: Language server check
|
|
shell: bash
|
|
run: |
|
|
python3 -m pip install github-release-downloader
|
|
python3 ./Tools/scripts/run_lua_language_check.py --debugLogging
|
|
|
|
- name: Remove problem matchers
|
|
run: |
|
|
echo "::remove-matcher owner=Luacheck-problem-matcher::"
|
|
echo "::remove-matcher owner=Lua-language-server-problem-matcher::"
|
|
|
|
- name: Generate docs md
|
|
shell: bash
|
|
run: |
|
|
./Tools/scripts/generate_lua_docs.sh
|
|
|
|
- name: copy docs
|
|
run: |
|
|
PATH="/github/home/.local/bin:$PATH"
|
|
mv "libraries/AP_Scripting/docs/docs.lua" "libraries/AP_Scripting/docs/current_docs.lua"
|
|
|
|
- name: build sitl # we don't really need to build the full code, just trigger docs re-gen with --scripting-docs, timeout after 10 seconds
|
|
shell: bash
|
|
run: |
|
|
git config --global --add safe.directory ${GITHUB_WORKSPACE}
|
|
PATH="/github/home/.local/bin:$PATH"
|
|
./waf configure --board sitl
|
|
timeout 10 ./waf antennatracker --scripting-docs || code=$?; if [[ $code -ne 124 && $code -ne 0 ]]; then exit $code; fi
|
|
|
|
- name: run compare
|
|
run: |
|
|
PATH="/github/home/.local/bin:$PATH"
|
|
python ./libraries/AP_Scripting/tests/docs_check.py "./libraries/AP_Scripting/docs/docs.lua" "./libraries/AP_Scripting/docs/current_docs.lua"
|
|
|
|
- name: Upload docs
|
|
uses: actions/upload-artifact@v5
|
|
with:
|
|
name: Docs
|
|
path: ScriptingDocs.md
|
|
retention-days: 7
|