From e66f9e5ae4c80109f064ecdba18741f45b80d142 Mon Sep 17 00:00:00 2001 From: Milkshak3s Date: Wed, 29 Mar 2023 09:50:45 -0700 Subject: [PATCH 1/2] Add job for integration tests (saves) --- .github/workflows/test.yml | 32 ++++++++++++++++++++++++++++++++ test/run-save-test.sh | 6 ++++++ 2 files changed, 38 insertions(+) create mode 100644 test/run-save-test.sh diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a6b75c422d2..b103ff36310 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -104,3 +104,35 @@ jobs: wget https://raw.githubusercontent.com/DiscordHooks/github-actions-discord-webhook/master/send.sh chmod +x send.sh ./send.sh failure $WEBHOOK_URL + Saves: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Setup Cache + uses: actions/cache@v3 + with: + path: $HOME/BYOND-${BYOND_MAJOR}.${BYOND_MINOR} + key: ${{ runner.os }}-byond-${{ env.BYOND_MAJOR }}-${{ env.BYOND_MINOR }} + - name: Install Dependencies + run: sudo apt-get install -y uchardet + - name: Run Tests + env: + TEST: CODE + run: test/run-save-test.sh + - name: Run Failure Webhook + env: + JOB_STATUS: ${{ job.status }} + WEBHOOK_URL: ${{ secrets.WEBHOOK_URL }} + HOOK_OS_NAME: ${{ runner.os }} + WORKFLOW_NAME: ${{ github.workflow }} + if: ${{ failure() }} + run: | + wget https://raw.githubusercontent.com/DiscordHooks/github-actions-discord-webhook/master/send.sh + chmod +x send.sh + ./send.sh failure $WEBHOOK_URL + services: + db: + image: ghcr.io/persistentss13/nebula-sql:dev + ports: + # this forwards to localhost - it will not be available at "db" + - 3306:3306 diff --git a/test/run-save-test.sh b/test/run-save-test.sh new file mode 100644 index 00000000000..806c66269c6 --- /dev/null +++ b/test/run-save-test.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +# TODO: This is a stub file! There are no tests ran as a result of this right now. + +# Remember: The DB is available at localhost:3306, NOT "db:3306", so you'll need to adjust config for the differing host +echo "Hello world!" \ No newline at end of file From 24e2684a2011ae8a2f93fa96a113d23c91515885 Mon Sep 17 00:00:00 2001 From: Milkshak3s Date: Wed, 29 Mar 2023 09:57:42 -0700 Subject: [PATCH 2/2] chmod +x run-save-test.sh --- test/run-save-test.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 test/run-save-test.sh diff --git a/test/run-save-test.sh b/test/run-save-test.sh old mode 100644 new mode 100755