Skip to content

Commit

Permalink
Merge pull request #77 from Starfly-13/too-many-file-dir
Browse files Browse the repository at this point in the history
Add new QA check for FILE_DIR to CI
  • Loading branch information
blinkdog authored Jun 22, 2024
2 parents 99a83ff + 7734330 commit 86b6e4d
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build_linux.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build Linux
name: QA
on:
push:
branches:
Expand All @@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Project
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install BYOND
run: tools/starfly/ci/install_byond_linux.sh
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build_windows.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build Windows
name: QA
on:
push:
branches:
Expand All @@ -17,7 +17,7 @@ jobs:
runs-on: windows-latest
steps:
- name: Checkout Project
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Build Project
run: pwsh tools/starfly/ci/build.ps1
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/check_file_dir.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: QA
on:
push:
branches:
- master
pull_request:
branches:
- master
merge_group:
branches:
- master

jobs:
check_file_dir:
if: ${{ !contains(github.event.head_commit.message, '[ci skip]') }}
name: "Check (FILE_DIR)"
runs-on: ubuntu-latest
steps:
- name: Checkout Project
uses: actions/checkout@v4

- name: Check FILE_DIR
run: |
count=$(grep -o 'FILE_DIR' shiptest.dme | wc -l)
if [[ "$count" -ne 3 ]]; then
echo "Error: shiptest.dme contains $count instances of FILE_DIR, expected exactly 3."
echo "See: https://tgstation13.org/phpBB/viewtopic.php?f=5&t=321"
exit 1
fi
echo "Success: shiptest.dme contains exactly 3 instances of FILE_DIR."

0 comments on commit 86b6e4d

Please sign in to comment.