Browse Source

feat: serverlist validate (#4207)

* server list validate

* dir

* dir

* dir

* cr

* add missing pc2

* pc2

* fix branch

* exit code

* repo

* branch

* fix csv

* letter

* tidy

* codacy

* exit code
pull/4213/head
Daniel Gibbs 2 years ago
committed by GitHub
parent
commit
03365ca5a7
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      .github/workflows/details-check.yml
  2. 22
      .github/workflows/serverlist-validate.sh
  3. 13
      .github/workflows/serverlist-validate.yml
  4. 13
      .github/workflows/version-check.yml
  5. 1
      lgsm/data/almalinux-8.csv
  6. 1
      lgsm/data/almalinux-9.csv
  7. 1
      lgsm/data/centos-7.csv
  8. 1
      lgsm/data/centos-8.csv
  9. 1
      lgsm/data/centos-9.csv
  10. 1
      lgsm/data/debian-10.csv
  11. 1
      lgsm/data/debian-11.csv
  12. 1
      lgsm/data/debian-12.csv
  13. 1
      lgsm/data/debian-9.csv
  14. 1
      lgsm/data/rhel-7.csv
  15. 1
      lgsm/data/rhel-8.csv
  16. 1
      lgsm/data/rhel-9.csv
  17. 1
      lgsm/data/rocky-8.csv
  18. 1
      lgsm/data/rocky-9.csv
  19. 1
      lgsm/data/serverlist.csv
  20. 1
      lgsm/data/ubuntu-16.04.csv
  21. 1
      lgsm/data/ubuntu-18.04.csv
  22. 1
      lgsm/data/ubuntu-20.04.csv
  23. 1
      lgsm/data/ubuntu-21.04.csv
  24. 5
      lgsm/data/ubuntu-21.10.csv
  25. 1
      lgsm/data/ubuntu-22.04.csv

10
.github/workflows/details-check.yml

@ -35,13 +35,13 @@ jobs:
run: sudo apt-get install libxml2-utils jq run: sudo apt-get install libxml2-utils jq
- name: Download linuxgsm.sh - name: Download linuxgsm.sh
run: wget https://raw.githubusercontent.com/GameServerManagers/LinuxGSM/feature/info_game-refactor/linuxgsm.sh; chmod +x linuxgsm.sh run: wget https://raw.githubusercontent.com/GameServerManagers/LinuxGSM/${GITHUB_REF#refs/heads/}/linuxgsm.sh; chmod +x linuxgsm.sh
- name: Grab server - name: Grab server
run: LGSM_GITHUBBRANCH="feature/info_game-refactor" ./linuxgsm.sh ${{ matrix.shortname }}server run: LGSM_GITHUBBRANCH="${GITHUB_REF#refs/heads/}" ./linuxgsm.sh ${{ matrix.shortname }}server
- name: Enable developer mode - name: Enable developer mode
run: LGSM_GITHUBBRANCH="feature/info_game-refactor" ./${{ matrix.shortname }}server developer run: LGSM_GITHUBBRANCH="${GITHUB_REF#refs/heads/}" ./${{ matrix.shortname }}server developer
- id: sets-servercfgname - id: sets-servercfgname
name: Generate servercfgname name: Generate servercfgname
@ -68,7 +68,7 @@ jobs:
run: grep "startparameters" lgsm/config-default/config-lgsm/${{ matrix.shortname }}server/_default.cfg run: grep "startparameters" lgsm/config-default/config-lgsm/${{ matrix.shortname }}server/_default.cfg
- name: Detect details - name: Detect details
run: LGSM_GITHUBBRANCH="feature/info_game-refactor" ./${{ matrix.shortname }}server detect-details run: LGSM_GITHUBBRANCH="${GITHUB_REF#refs/heads/}" ./${{ matrix.shortname }}server detect-details
- name: Query Raw - name: Query Raw
run: LGSM_GITHUBBRANCH="feature/info_game-refactor" ./${{ matrix.shortname }}server query-raw run: LGSM_GITHUBBRANCH="${GITHUB_REF#refs/heads/}" ./${{ matrix.shortname }}server query-raw

22
.github/workflows/serverlist-validate.sh

@ -0,0 +1,22 @@
#!/bin/bash
echo "Checking that all the game servers are listed in all csv files"
echo "this check will ensure serverlist.csv has the same number of lines (-2 lines) as the other csv files"
# count the number of lines in the serverlist.csv
cd "lgsm/data" || exit
serverlistcount="$(wc -l < serverlist.csv)"
echo "serverlistcount: $serverlistcount"
# get list of all csv files starting with ubunutu debian centos
csvlist="$(ls -1 | grep -E '^(ubuntu|debian|centos|rhel|almalinux|rocky).*\.csv$')"
# loop though each csv file and make sure the number of lines is the same as the serverlistcount
for csv in $csvlist; do
csvcount="$(wc -l < "${csv}")"
csvcount=$((csvcount-2))
if [ "$csvcount" -ne "$serverlistcount" ]; then
echo "ERROR: $csv ($csvcount) does not match serverlist.csv ($serverlistcount)"
exitcode=1
else
echo "OK: $csv ($csvcount) and serverlist.csv ($serverlistcount) match"
fi
done
exit ${exitcode}

13
.github/workflows/serverlist-validate.yml

@ -0,0 +1,13 @@
name: Server list Validation
on:
workflow_dispatch:
push:
jobs:
serverlist-validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: compare versions
run: chmod +x .github/workflows/serverlist-validate.sh; .github/workflows/serverlist-validate.sh

13
.github/workflows/version-check.yml

@ -1,26 +1,15 @@
# This is a basic workflow to help you get started with Actions
name: Version Check name: Version Check
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on: push on: push
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
permissions: permissions:
contents: read contents: read
jobs: jobs:
# This workflow contains a single job called "build" version-Check:
Version-Check:
# The type of runner that the job will run on
runs-on: ubuntu-latest runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps: steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3 - uses: actions/checkout@v3
# Runs a single command using the runners shell
- name: compare versions - name: compare versions
run: chmod +x .github/workflows/version-check.sh; .github/workflows/version-check.sh run: chmod +x .github/workflows/version-check.sh; .github/workflows/version-check.sh

1
lgsm/data/almalinux-8.csv

@ -78,6 +78,7 @@ ns2c,speex.i686,tbb.i686
onset,mariadb-connector-c onset,mariadb-connector-c
opfor opfor
pc pc
pc2
pmc,java-17-openjdk pmc,java-17-openjdk
pstbs,GConf2 pstbs,GConf2
pvkii pvkii

Can't render this file because it has a wrong number of fields in line 2.

1
lgsm/data/almalinux-9.csv

@ -78,6 +78,7 @@ ns2c,speex.i686,tbb.i686
onset,mariadb-connector-c onset,mariadb-connector-c
opfor opfor
pc pc
pc2
pmc,java-17-openjdk pmc,java-17-openjdk
pstbs,GConf2 pstbs,GConf2
pvkii pvkii

Can't render this file because it has a wrong number of fields in line 2.

1
lgsm/data/centos-7.csv

@ -78,6 +78,7 @@ ns2c,speex.i686,tbb.i686
onset,mariadb-connector-c onset,mariadb-connector-c
opfor opfor
pc pc
pc2
pmc,java-11-openjdk pmc,java-11-openjdk
pstbs,GConf2 pstbs,GConf2
pvkii pvkii

Can't render this file because it has a wrong number of fields in line 2.

1
lgsm/data/centos-8.csv

@ -78,6 +78,7 @@ ns2c,speex.i686,tbb.i686
onset,mariadb-connector-c onset,mariadb-connector-c
opfor opfor
pc pc
pc2
pmc,java-17-openjdk pmc,java-17-openjdk
pstbs,GConf2 pstbs,GConf2
pvkii pvkii

Can't render this file because it has a wrong number of fields in line 2.

1
lgsm/data/centos-9.csv

@ -78,6 +78,7 @@ ns2c,speex.i686,tbb.i686
onset,mariadb-connector-c onset,mariadb-connector-c
opfor opfor
pc pc
pc2
pmc,java-17-openjdk pmc,java-17-openjdk
pstbs,GConf2 pstbs,GConf2
pvkii pvkii

Can't render this file because it has a wrong number of fields in line 2.

1
lgsm/data/debian-10.csv

@ -78,6 +78,7 @@ ns2c,speex:i386,libtbb2
onset,libmariadb-dev onset,libmariadb-dev
opfor opfor
pc pc
pc2
pmc,openjdk-11-jre pmc,openjdk-11-jre
pstbs,libgconf-2-4 pstbs,libgconf-2-4
pvkii pvkii

Can't render this file because it has a wrong number of fields in line 2.

1
lgsm/data/debian-11.csv

@ -78,6 +78,7 @@ ns2c,speex:i386,libtbb2
onset,libmariadb-dev onset,libmariadb-dev
opfor opfor
pc pc
pc2
pmc,openjdk-17-jre pmc,openjdk-17-jre
pstbs,libgconf-2-4 pstbs,libgconf-2-4
pvkii pvkii

Can't render this file because it has a wrong number of fields in line 2.

1
lgsm/data/debian-12.csv

@ -78,6 +78,7 @@ ns2c,speex:i386,libtbb12
onset,libmariadb-dev onset,libmariadb-dev
opfor opfor
pc pc
pc2
pmc,openjdk-17-jre pmc,openjdk-17-jre
pstbs,libgconf-2-4 pstbs,libgconf-2-4
pvkii pvkii

Can't render this file because it has a wrong number of fields in line 2.

1
lgsm/data/debian-9.csv

@ -78,6 +78,7 @@ ns2c,speex:i386,libtbb2
onset,libmariadb-dev onset,libmariadb-dev
opfor opfor
pc pc
pc2
pmc,openjdk-8-jre pmc,openjdk-8-jre
pstbs,libgconf-2-4 pstbs,libgconf-2-4
pvkii pvkii

Can't render this file because it has a wrong number of fields in line 2.

1
lgsm/data/rhel-7.csv

@ -78,6 +78,7 @@ ns2c,speex.i686,tbb.i686
onset,mariadb-connector-c onset,mariadb-connector-c
opfor opfor
pc pc
pc2
pmc,java-11-openjdk pmc,java-11-openjdk
pstbs,GConf2 pstbs,GConf2
pvkii pvkii

Can't render this file because it has a wrong number of fields in line 2.

1
lgsm/data/rhel-8.csv

@ -78,6 +78,7 @@ ns2c,speex.i686,tbb.i686
onset,mariadb-connector-c onset,mariadb-connector-c
opfor opfor
pc pc
pc2
pmc,java-17-openjdk pmc,java-17-openjdk
pstbs,GConf2 pstbs,GConf2
pvkii pvkii

Can't render this file because it has a wrong number of fields in line 2.

1
lgsm/data/rhel-9.csv

@ -78,6 +78,7 @@ ns2c,speex.i686,tbb.i686
onset,mariadb-connector-c onset,mariadb-connector-c
opfor opfor
pc pc
pc2
pmc,java-17-openjdk pmc,java-17-openjdk
pstbs,GConf2 pstbs,GConf2
pvkii pvkii

Can't render this file because it has a wrong number of fields in line 2.

1
lgsm/data/rocky-8.csv

@ -78,6 +78,7 @@ ns2c,speex.i686,tbb.i686
onset,mariadb-connector-c onset,mariadb-connector-c
opfor opfor
pc pc
pc2
pmc,java-17-openjdk pmc,java-17-openjdk
pstbs,GConf2 pstbs,GConf2
pvkii pvkii

Can't render this file because it has a wrong number of fields in line 2.

1
lgsm/data/rocky-9.csv

@ -78,6 +78,7 @@ ns2c,speex.i686,tbb.i686
onset,mariadb-connector-c onset,mariadb-connector-c
opfor opfor
pc pc
pc2
pmc,java-17-openjdk pmc,java-17-openjdk
pstbs,GConf2 pstbs,GConf2
pvkii pvkii

Can't render this file because it has a wrong number of fields in line 2.

1
lgsm/data/serverlist.csv

@ -128,4 +128,3 @@ wmc,wmcserver,WaterfallMC,ubuntu-22.04
wurm,wurmserver,Wurm Unlimited,ubuntu-22.04 wurm,wurmserver,Wurm Unlimited,ubuntu-22.04
zmr,zmrserver,Zombie Master: Reborn,ubuntu-22.04 zmr,zmrserver,Zombie Master: Reborn,ubuntu-22.04
zps,zpsserver,Zombie Panic! Source,ubuntu-22.04 zps,zpsserver,Zombie Panic! Source,ubuntu-22.04

Can't render this file because it has a wrong number of fields in line 47.

1
lgsm/data/ubuntu-16.04.csv

@ -78,6 +78,7 @@ ns2c,speex:i386,libtbb2
onset,libmariadb-dev onset,libmariadb-dev
opfor opfor
pc pc
pc2
pmc,openjdk-8-jre pmc,openjdk-8-jre
pstbs,libgconf-2-4 pstbs,libgconf-2-4
pvkii pvkii

Can't render this file because it has a wrong number of fields in line 2.

1
lgsm/data/ubuntu-18.04.csv

@ -78,6 +78,7 @@ ns2c,speex:i386,libtbb2
onset,libmariadb-dev onset,libmariadb-dev
opfor opfor
pc pc
pc2
pmc,openjdk-11-jre pmc,openjdk-11-jre
pstbs,libgconf-2-4 pstbs,libgconf-2-4
pvkii pvkii

Can't render this file because it has a wrong number of fields in line 2.

1
lgsm/data/ubuntu-20.04.csv

@ -78,6 +78,7 @@ ns2c,speex:i386,libtbb2
onset,libmariadb-dev onset,libmariadb-dev
opfor opfor
pc pc
pc2
pmc,openjdk-17-jre pmc,openjdk-17-jre
pstbs,libgconf-2-4 pstbs,libgconf-2-4
pvkii pvkii

Can't render this file because it has a wrong number of fields in line 2.

1
lgsm/data/ubuntu-21.04.csv

@ -78,6 +78,7 @@ ns2c,speex:i386,libtbb2
onset,libmariadb-dev onset,libmariadb-dev
opfor opfor
pc pc
pc2
pmc,openjdk-17-jre pmc,openjdk-17-jre
pstbs,libgconf-2-4 pstbs,libgconf-2-4
pvkii pvkii

Can't render this file because it has a wrong number of fields in line 2.

5
lgsm/data/ubuntu-21.10.csv

@ -16,10 +16,11 @@ bfv,libncurses5:i386,libstdc++5:i386
bmdm,libncurses5:i386 bmdm,libncurses5:i386
bo bo
bs bs
bt,libicu-dev bt,libicu-dev,dos2unix
btl btl
cc cc
ck,xvfb ck,xvfb
cd
cmw cmw
cod,libstdc++5:i386 cod,libstdc++5:i386
cod2,libstdc++5:i386 cod2,libstdc++5:i386
@ -32,6 +33,7 @@ cscz
csgo csgo
css,libtinfo5:i386 css,libtinfo5:i386
dab dab
dayz
dmc dmc
dod dod
dodr dodr
@ -76,6 +78,7 @@ ns2c,speex:i386,libtbb2
onset,libmariadb-dev onset,libmariadb-dev
opfor opfor
pc pc
pc2
pmc,openjdk-17-jre pmc,openjdk-17-jre
pstbs,libgconf-2-4 pstbs,libgconf-2-4
pvkii pvkii

Can't render this file because it has a wrong number of fields in line 2.

1
lgsm/data/ubuntu-22.04.csv

@ -78,6 +78,7 @@ ns2c,speex:i386,libtbb2
onset,libmariadb-dev onset,libmariadb-dev
opfor opfor
pc pc
pc2
pmc,openjdk-17-jre pmc,openjdk-17-jre
pstbs,libgconf-2-4 pstbs,libgconf-2-4
pvkii pvkii

Can't render this file because it has a wrong number of fields in line 2.
Loading…
Cancel
Save