11.1 - Undermine(d) #6010
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
name: Automated Build | |
on: | |
pull_request: | |
push: | |
branches: [master] | |
jobs: | |
build: | |
name: Lint & Test | |
runs-on: ubuntu-latest | |
env: | |
lua-version: 5.1 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install lua ${{ env.lua-version }} & luarocks | |
run: | | |
sudo apt update | |
sudo apt install lua${{ env.lua-version }} luarocks | |
# The lua-format library takes a while to compile, so we cache it | |
# Update the YYYYMMDD component of the cache key if you want to force an update | |
- name: Cache/restore ~/.luarocks directory | |
uses: actions/cache@v4 | |
with: | |
path: ~/.luarocks | |
key: ${{ runner.os }}-cache-lua-rocks-${{ env.lua-version }}-20240606 | |
- name: Install luacheck | |
run: | | |
if [[ ! -f ~/.luarocks/bin/luacheck ]]; then | |
luarocks --local install luacheck | |
fi | |
- name: Install lua-format | |
run: | | |
if [[ ! -f ~/.luarocks/bin/lua-format ]]; then | |
luarocks --local install https://raw.githubusercontent.com/Koihik/LuaFormatter/master/luaformatter-scm-1.rockspec | |
fi | |
- name: Lint sources | |
run: ./build.sh -v run-linter | |
- name: Run tests | |
run: ./build.sh -v run-tests | |
- name: Run format checks | |
run: ./build.sh -v check-formatter |