Skip to content

ci: added test-build step to check workflow #2

ci: added test-build step to check workflow

ci: added test-build step to check workflow #2

Workflow file for this run

name: Check
on:
push:
branches:
- main
- 'renovate/**'
paths:
- .github/workflows/check.yml
- '**.rockspec'
- src
pull_request:
branches:
- main
paths:
- .github/workflows/check.yml
- '**.rockspec'
- src
workflow_dispatch:
jobs:
lint-rockspecs:
name: Lint Rockspecs
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Setup Lua
uses: leafo/[email protected]
- name: Setup LuaRocks
uses: leafo/[email protected]
- name: Run luarocks lint
run: |
shopt -s nullglob
rockspecs=(*.rockspec **/*.rockspec)
if [[ "${#rockspecs[@]}" -eq 0 ]]; then
echo "No rockspecs found"
exit 1
fi
for rockspec in "${rockspecs[@]}"; do
echo "Linting $rockspec"
luarocks lint "$rockspec"
done
test-build:
name: Test Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Setup Lua
uses: leafo/[email protected]
- name: Setup LuaRocks
uses: leafo/[email protected]
- name: Run luarocks build
run: luarocks build