Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Automatic checks for every pull request and every push to main.
# Free on public repositories. Mirrors stages 1 and 3 of the author's local
# deploy tool: the static checker (PRUEFER) and a syntax check of every script
# AND of every daemon embedded as a template string (payloads) - a typo inside
# a payload parses fine from the outside and only fails when the Queen writes
# the daemon to disk in the game.
name: check

on:
pull_request:
push:
branches: [main]

permissions:
contents: read

jobs:
check:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 20

- name: PRUEFER (static checks - version headers, payload rules, ports, registry, RPC names)
run: perl tools/SCHWARM-PRUEFER.pl scripts -kurz

- name: Syntax of every script (ES modules)
run: |
fehler=0
for f in scripts/*.js schwarm-install.js; do
if ! node --input-type=module --check < "$f"; then
echo "::error file=$f::syntax error"
fehler=1
fi
done
exit $fehler

- name: Syntax of every embedded payload daemon
run: node tools/nutzlast-check.mjs scripts/SCHWARM-PAYLOADS.js scripts/SCHWARM-DARKNET.js scripts/SCHWARM-GENESIS.js
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# SCHWARM — a self-driving script suite for Bitburner

[![check](https://github.com/Here0001/Bitburner-Scripte/actions/workflows/check.yml/badge.svg)](https://github.com/Here0001/Bitburner-Scripte/actions/workflows/check.yml)

**SCHWARM** (German for *swarm*) plays [Bitburner](https://github.com/bitburner-official/bitburner-src) largely by itself.
It roots and hacks the whole network, manages your money, buys and installs augmentations, and runs gangs,
corporations, Bladeburner, the stock market, the Darknet, IPvGO and Stanek's Gift. It can also end a BitNode for
Expand Down Expand Up @@ -56,6 +58,12 @@ Things worth knowing before you start:
- **[Script reference](docs/SCRIPTS.md)**: what every script and embedded daemon does, how to run it on its own,
RAM, requirements, and how to switch it on or off.

## Checks

Every pull request and every push to `main` runs [automatic checks](.github/workflows/check.yml): a static checker
(`tools/SCHWARM-PRUEFER.pl`: version headers, payload rules, port table, daemon registry, RPC names) and a syntax
check of every script and of every daemon embedded as a template string (`tools/nutzlast-check.mjs`).

## Credits

- **casino.js** by **Alain Bryden** ([alainbryden/bitburner-scripts](https://github.com/alainbryden/bitburner-scripts), MIT License).
Expand Down
Loading
Loading