Add security.md file to the repo #243
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: CI Build | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| jobs: | |
| lint-github-actions: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| security-events: write | |
| contents: read | |
| actions: read | |
| defaults: | |
| run: | |
| shell: bash | |
| concurrency: | |
| group: '${{ github.workflow }}-github-actions-linter-${{ github.ref }}' | |
| cancel-in-progress: true | |
| steps: | |
| - name: Checkout the repository | |
| id: checkout | |
| uses: actions/checkout@v7 | |
| with: | |
| persist-credentials: false | |
| - name: Lint GitHub actions with Zizmore | |
| id: lint-github-actions | |
| uses: zizmorcore/zizmor-action@192e21d79ab29983730a13d1382995c2307fbcaa | |
| with: | |
| advanced-security: false | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout the repository | |
| uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Install Lua and LuaRocks | |
| run: | | |
| sudo apt-get install lua5.4 liblua5.4-dev luarocks | |
| sudo apt-get remove lua5.1 | |
| sudo update-alternatives --install /usr/bin/lua lua-interpreter /usr/bin/lua5.4 54 | |
| sudo update-alternatives --install /usr/bin/luac lua-compiler /usr/bin/luac5.4 54 | |
| sudo update-alternatives --set lua-interpreter /usr/bin/lua5.4 | |
| sudo update-alternatives --set lua-compiler /usr/bin/luac5.4 | |
| luarocks config --scope user lua_version 5.4 | |
| luarocks config --scope user lua_dir /usr | |
| luarocks config --local deploy_bin_dir >> "$GITHUB_PATH" | |
| test "$(lua -e 'print(_VERSION)')" = "Lua 5.4" | |
| test "$(luarocks config lua_version)" = "5.4" | |
| test "$(luarocks config variables.LUA_INCDIR)" = "/usr/include/lua5.4" | |
| - name: Install Lua dependencies | |
| run: luarocks make --local --lua-version 5.4 | |
| - name: Run tests | |
| run: tools/run_tests.sh --run=ci | |
| - name: Run static code analysis | |
| run: tools/run_luacheck.sh | |
| - name: Run type checker | |
| run: tools/run-type-check.sh | |
| - name: Run shellcheck | |
| run: tools/shellcheck.sh | |
| - name: Archive code coverage results | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: luacov-report | |
| path: target/luacov-reports/* | |
| - name: Build API documentation | |
| run: tools/build_docs.sh | |
| - name: Upload API documentation | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: api-documentation | |
| path: target/luals-doc/ | |
| if-no-files-found: error | |
| ## This is a separate job because it requires running apt-get which takes > 40s. | |
| ## When the other job also uses apt-get this can be moved back. | |
| plantuml: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| name: "Build Plantuml diagrams" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 1 | |
| persist-credentials: false | |
| - name: Install Plantuml | |
| run: | | |
| sudo apt-get update -y | |
| sudo apt-get install -y plantuml | |
| - name: Build diagrams | |
| run: tools/build_diagrams.sh |