Files
skyweave/.gitea/workflows/ci.yaml
T
wes 484410c4b6
Skyweave Test, Lint, and Deploy Ritual / Test and Lint Code (push) Successful in 29s
Skyweave Test, Lint, and Deploy Ritual / Deploy to Roof Unit (push) Failing after 4s
bruh
2025-06-16 22:12:57 -04:00

76 lines
2.6 KiB
YAML
Executable File

name: Skyweave Test, Lint, and Deploy Ritual
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test-and-lint:
name: Test and Lint Code
runs-on: ubuntu-latest
steps:
- name: 1. Checkout Repository Code
uses: actions/checkout@v4
- name: 2. Install Core Lua Dependencies
run: |
echo "Sanctifying runner with core Lua environment..."
# Use apt-get for the Ubuntu-based runner environment
sudo apt-get update
sudo apt-get install -y lua5.1 luarocks
- name: 3. Install Lua Tools via Luarocks
run: |
echo "Installing Luacheck and Busted via Luarocks..."
# This method is more reliable than relying on apt for Lua packages
sudo luarocks install busted
sudo luarocks install luacheck
- name: 4. Run Luacheck Scrutiny
run: |
echo "Scanning Lua scripture..."
# The luacheck command is now available from the luarocks installation
luacheck --std lua51 .
- name: 5. Perform Unit Inquisition (Busted)
run: |
echo "Initiating unit tests..."
cp lib/json.lua skyweave/
busted --lua=lua5.1 --verbose spec/
deploy-to-device:
name: Deploy to Roof Unit
needs: test-and-lint
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
steps:
- name: 1. Checkout Repository Code
uses: actions/checkout@v4
- name: 2. Prepare SSH Environment
run: |
echo "Preparing the sacred keys and crypto-litany for SSH communion..."
mkdir -p ~/.ssh/
echo "${{ secrets.ROOF_UNIT_SSH_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan -H "${{ secrets.ROOF_UNIT_HOSTNAME }}" >> ~/.ssh/known_hosts
echo "Host roof-unit" > ~/.ssh/config
echo " HostName ${{ secrets.ROOF_UNIT_HOSTNAME }}" >> ~/.ssh/config
echo " User ${{ secrets.ROOF_UNIT_USER }}" >> ~/.ssh/config
echo " IdentityFile ~/.ssh/id_rsa" >> ~/.ssh/config
echo " KexAlgorithms +diffie-hellman-group1-sha1" >> ~/.ssh/config
echo " HostKeyAlgorithms +ssh-rsa" >> ~/.ssh/config
echo " MACs +hmac-sha1" >> ~/.ssh/config
echo " PubkeyAcceptedAlgorithms +ssh-rsa" >> ~/.ssh/config
- name: 3. Execute Deployment Ritual
run: |
echo "Initiating deployment sequence..."
chmod +x ./skyweave_deploy.sh
./skyweave_deploy.sh