File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Verify WAV Sounds Conform to Standard
2+ on : [pull_request]
3+ jobs :
4+ PCX-Conformity :
5+ name : Verify WAV Sounds Conform to Standard
6+ runs-on : ubuntu-latest
7+ container :
8+ image : ubuntu:24.04
9+ steps :
10+ - name : Install file
11+ run : apt update && apt install file -y
12+ shell : bash
13+ - name : Checkout
14+ uses : actions/checkout@v2
15+ - name : Wait for GitHub to keep up..
16+ run : sleep 2s
17+ shell : bash
18+ - name : Run Script
19+ run : |
20+ bash testing/wav_validator.sh
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ #
3+ # Nazi Zombies: Portable
4+ # Validate .WAV files are mono.
5+ # ----
6+ # This is intended to be used via a Docker
7+ # container running ubuntu:24.04.
8+ #
9+ set -o errexit
10+
11+ ASSETS_ROOT=$( dirname " ${BASH_SOURCE[0]} " ) /../
12+ cd " ${ASSETS_ROOT} "
13+
14+ source " ${ASSETS_ROOT} /testing/utils.sh"
15+
16+ #
17+ # main()
18+ # ----
19+ # Test entry point.
20+ #
21+ function main()
22+ {
23+ local total_failures=0
24+
25+ # Iterate through every .wav in our assets..
26+ while read -r wav_file; do
27+ echo " [INFO]: Verifying WAV sound file [${wav_file} ].."
28+ local file_output=$( file " ${wav_file} " )
29+
30+ # Check for indexed keyword
31+ if [[ " ${file_output} " != * " , mono " * ]]; then
32+ echo " - ERROR: WAV [${wav_file} ] is not a mono sample!"
33+ total_failures=$(( total_failures + 1 ))
34+ fi
35+ done < <( find . -type f -name " *.wav" )
36+
37+ if [[ " ${total_failures} " -ne 0 ]]; then
38+ echo " [ERROR]: FAILED to validate [${total_failures} ] WAV sounds!"
39+ exit 1
40+ else
41+ echo " [PASS]: No issues found :)"
42+ exit 0
43+ fi
44+ }
45+
46+ main;
You can’t perform that action at this time.
0 commit comments