Skip to content

Commit

Permalink
Merge branch 'yogstation13:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
bruhlookatthisdood authored Dec 9, 2023
2 parents 6a86cf0 + 6f11ff0 commit bff1cfc
Show file tree
Hide file tree
Showing 749 changed files with 16,352 additions and 13,017 deletions.
1 change: 1 addition & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ Maintainers can revert your changes if they feel they are not worth maintaining

- [Embedding TGUI Components in Chat](../../tgui/docs/chat-embedded-components.md)
- [Hard Deletes](./guides/HARDDELETES.md)
- [Quickly setting up a development database with ezdb](./guides/EZDB.md)
- [MC Tab Guide](./guides/MC_tab.md)
- [Tick system](./guides/TICK_ORDER.md)
- [UI Development](../tgui/README.md)
Expand Down
12 changes: 12 additions & 0 deletions .github/guides/EZDB.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Quickly setting up a development database with ezdb
While you do not need a database to code for yogstation, it is a prerequisite to many important features, especially on the admin side. Thus, if you are working in any code that benefits from it, it can be helpful to have one handy.

**ezdb** is a tool for quickly setting up an isolated development database. It will manage downloading MariaDB, creating the database, setting it up, and updating it when the code evolves. It is not recommended for use in production servers, but is perfect for quick development.

To run ezdb, go to `tools/ezdb`, and double-click on ezdb.bat. This will set up the database on port 1338, but you can configure this with `--port`. When it is done, you should be able to launch yogstation as normal and have database access. This runs on the same Python bootstrapper as things like the map merge tool, which can sometimes be flaky.

If you wish to delete the ezdb database, delete the `db` folder as well as `config/ezdb.txt`.

To update ezdb, run the script again. This will both look for any updates in the database changelog, as well as update your schema revision.

Contact Mothblocks if you face any issues in this process.
43 changes: 39 additions & 4 deletions .github/workflows/turdis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,17 +88,39 @@ jobs:
- name: Compile All Maps
run: |
tools/build/build --ci dm -DCIBUILDING -DCITESTING -DALL_MAPS
find_all_maps:
if: "!contains(github.event.head_commit.message, '[ci skip]')"
name: Find Maps to Test
runs-on: ubuntu-20.04
outputs:
maps: ${{ steps.map_finder.outputs.maps }}
steps:
- uses: actions/checkout@v2
- name: Find Maps
id: map_finder
run: |
echo "$(ls -mw0 _maps/*.json)" > maps_output.txt
sed -i -e s+_maps/+\"+g -e s+.json+\"+g maps_output.txt
echo "Maps: $(cat maps_output.txt)"
echo "maps={\"paths\":[$(cat maps_output.txt)]}" >> $GITHUB_OUTPUT
test:
name: Compile and Run Tests
runs-on: ubuntu-20.04
needs: [find_all_maps]
strategy:
fail-fast: false
matrix:
map: ${{ fromJSON(needs.find_all_maps.outputs.maps).paths }}
services:
mariadb:
image: mariadb
ports:
- 3306:3306
env:
MARIADB_ALLOW_EMPTY_ROOT_PASSWORD: yes

concurrency:
group: ci-${{ github.ref }}-${{ matrix.map }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v2

Expand Down Expand Up @@ -136,7 +158,7 @@ jobs:
- name: Compile
run: |
tools/build/build --ci dm -DCIBUILDING
tools/travis/dm.sh -DTRAVISBUILDING yogstation.dme || travis_terminate 1
tools/travis/dm.sh -DTRAVISBUILDING -DANSICOLORS yogstation.dme || travis_terminate 1
- name: Prepare Artifacts
run: |
Expand All @@ -147,10 +169,23 @@ jobs:
- name: Upload Artifacts
uses: actions/upload-artifact@v1
with:
name: DMB + RSC
name: DMB + RSC ${{matrix.map}}
path: ${{github.workspace}}/artifacts

- name: Run Tests
run: |
tools/travis/run_server.sh
tools/travis/run_server.sh ${{ matrix.map }}
results:
if: ${{ always() }}
runs-on: ubuntu-latest
name: Final Map Test
needs: [test]
steps:
- run: exit 1
# see https://stackoverflow.com/a/67532120/4907315
if: >-
${{
contains(needs.*.result, 'failure')
|| contains(needs.*.result, 'cancelled')
}}
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -218,3 +218,7 @@ tools/MapAtmosFixer/MapAtmosFixer/bin/*

#KDIFF3 files
*.orig

# ezdb
/db/
/config/ezdb.txt
Loading

0 comments on commit bff1cfc

Please sign in to comment.