small cleanup and expand test coverage of living/status #1884
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: Unit Tests on ubuntu | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install Packages | |
uses: awalsh128/cache-apt-pkgs-action@v1 | |
with: | |
packages: build-essential autoconf automake bison telnet \ | |
libmysqlclient-dev libpcre3-dev libpq-dev libsqlite3-dev \ | |
libssl-dev libtool libz-dev libgtest-dev libjemalloc-dev | |
version: 1.0 | |
- name: Cache Driver | |
uses: actions/cache@v4 | |
id: cache | |
with: | |
path: build | |
key: ${{ hashFiles('**/driver/src') }} | |
- name: Build Driver | |
if: steps.cache.outputs.cache-hit != 'true' | |
run: ./build.sh | |
shell: bash | |
timeout-minutes: 10 | |
- name: Modify Config for Local Test Run | |
run: | | |
# Replace absolute path with relative path | |
sed -i 's|/home/mud/game/lib|./lib|g' lib/secure/etc/nightmare-residuum.config | |
# Disable external_port_2 | |
sed -i 's|^external_port_2|# external_port_2|' lib/secure/etc/nightmare-residuum.config | |
shell: bash | |
timeout-minutes: 1 | |
- name: Run Tests | |
run: | | |
./build/bin/driver lib/secure/etc/nightmare-residuum.config -ftest | |
shell: bash | |
timeout-minutes: 1 | |
- name: LPC Code Problems | |
uses: jlchmura/lpc-build-action@main | |
with: | |
lpc-config: ${{ github.workspace }}/lpc-config.json |