Merge pull request #15 from uhppoted/dependabot/npm_and_yarn/cross-sp… #85
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: lua | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go 1.x | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ^1.23 | |
id: go | |
- name: Install staticcheck | |
run: go install honnef.co/go/tools/cmd/staticcheck@latest | |
# NTS: needs to be before the lua install because it overwrites the folder | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Set up Lua 5.4.x | |
uses: leafo/gh-actions-lua@v10 | |
with: | |
luaVersion: "5.4" | |
buildCache: false | |
- name: Set up luarocks | |
uses: leafo/gh-actions-luarocks@v4 | |
- name: Install Lua packages | |
run: | | |
luarocks install argparse | |
luarocks install luasocket | |
luarocks install luaunit | |
- name: Install Rust toolchain (for stylua) | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
default: true | |
override: true | |
- name: Install stylua | |
run: cargo install stylua --features lua54 | |
- name: Build | |
run: make lua | |
- name: Test | |
run: make lua-test | |