Fixing ci pipeline
This commit is contained in:
+20
-34
@@ -1,53 +1,39 @@
|
|||||||
name: Skyweave CI Rituals
|
name: Skyweave Test & Lint Ritual
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ master ]
|
branches: [ main ]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ master ]
|
branches: [ main ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lint-lua-code:
|
test-and-lint:
|
||||||
name: Luacheck static analysis
|
name: Test and Lint Code
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest # This key was missing from your linting job
|
||||||
|
|
||||||
|
# We use a single, public image that has Node.js for the checkout action
|
||||||
container:
|
container:
|
||||||
image: node:lts-alpine
|
image: node:lts-alpine
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: 1. Install Dependencies (luacheck)
|
- name: 1. Checkout Repository Code
|
||||||
run: |
|
|
||||||
echo "Sanctifying container with luacheck..."
|
|
||||||
apk add --no-cache luacheck
|
|
||||||
|
|
||||||
- name: 2. Checkout Repository Code
|
|
||||||
# This standard action checks out your repository's code into the container.
|
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: 2. Install Lua Dependencies
|
||||||
|
run: |
|
||||||
|
echo "Sanctifying container with Lua tools..."
|
||||||
|
# Installs luacheck for linting, and Lua + Luarocks for Busted
|
||||||
|
apk add --no-cache luacheck lua5.1-dev build-base git
|
||||||
|
luarocks install busted
|
||||||
|
|
||||||
- name: 3. Run Luacheck Scrutiny
|
- name: 3. Run Luacheck Scrutiny
|
||||||
run: |
|
run: |
|
||||||
echo "Scanning Lua scripture for syntactical heresy..."
|
echo "Scanning Lua scripture..."
|
||||||
|
# With your perfected .luacheckrc, this single command handles all files
|
||||||
luacheck --std lua51 .
|
luacheck --std lua51 .
|
||||||
|
|
||||||
unit-test-lua:
|
- name: 4. Perform Unit Inquisition (Busted)
|
||||||
name: Rite of Unit Inquisition (Busted)
|
|
||||||
# This job will only start if the 'lint-lua-code' job is successful.
|
|
||||||
needs: lint-lua-code
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
# Use a container that has Lua and the 'luarocks' package manager.
|
|
||||||
container:
|
|
||||||
image: luajit/luajit:v2.1-alpine
|
|
||||||
steps:
|
|
||||||
- name: 1. Checkout Repository Code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: 2. Install Busted Framework
|
|
||||||
run: |
|
run: |
|
||||||
echo "Sanctifying container with the Busted testing framework..."
|
echo "Initiating unit tests..."
|
||||||
# Luarocks is the package manager for Lua modules.
|
# Busted will automatically find and run files in the 'spec/' directory
|
||||||
apk add --no-cache git
|
|
||||||
luarocks install busted
|
|
||||||
- name: 3. Perform Unit Inquisition
|
|
||||||
run: |
|
|
||||||
echo "Initiating unit inquisition..."
|
|
||||||
# Busted will automatically find and run files in the 'spec/' directory.
|
|
||||||
busted --lua=lua5.1 --verbose spec/
|
busted --lua=lua5.1 --verbose spec/
|
||||||
Reference in New Issue
Block a user