Skip to content

Commit

Permalink
feat: Add APIs (#2)
Browse files Browse the repository at this point in the history
* add: Map, Match and Game Api

* add: RabbitMQ to CI

* add: leaderboard, user, notification APIs

* fix: Update to latest API spec

* add: Instructions in README

* add: Map validator

* fix: Move to assert4j

* add: Instruction for docker setup

Co-authored-by: Dipesh Kafle <[email protected]>
  • Loading branch information
CaptainIRS and dipeshkaphle authored Feb 14, 2022
1 parent dee8f88 commit 1e7373b
Show file tree
Hide file tree
Showing 97 changed files with 3,464 additions and 190 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ jobs:
test:
runs-on: ubuntu-latest
needs: build
services:
rabbitmq:
image: rabbitmq:3-management
ports:
- 5672:5672
steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ on:
jobs:
deploy:
runs-on: ubuntu-latest
services:
rabbitmq:
image: rabbitmq:3-management
ports:
- 5672:5672
steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
Expand Down
3 changes: 2 additions & 1 deletion .runConfigurations/DB.run.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="DB" type="docker-deploy" factoryName="docker-compose.yml" server-name="Docker">
<configuration default="false" name="DB &amp; RabbitMQ" type="docker-deploy" factoryName="docker-compose.yml" server-name="Docker">
<deployment type="docker-compose.yml">
<settings>
<option name="buildKitEnabledForCompose" value="true" />
<option name="envFilePath" value="" />
<option name="services">
<list>
<option value="db" />
<option value="rabbitmq" />
</list>
</option>
<option name="sourceFilePath" value="docker-compose.dev.yml" />
Expand Down
2 changes: 1 addition & 1 deletion .runConfigurations/Format.run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value="" />
<option name="scriptParameters" value="--info" />
<option name="taskDescriptions">
<list />
</option>
Expand Down
23 changes: 21 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,26 @@
</a>
</p>

### Prerequisites
1. JDK 17 (Ubuntu: install the `openjdk-17-jdk` package)
2. [Intellij IDEA Ultimate](https://www.jetbrains.com/idea/download/#section=linux)
3. Docker

### Setup

1. Copy server/src/main/resources/application.example.yml to server/src/main/resources/application.yml.
2. Run `./gradlew tasks` to see the tasks available.
1. Clone the repo and open in IntelliJ Ultimate.
2. Press `Ctrl+Alt+Shift+S` and make sure the JDK version is 17.
3. Press `Ctrl+Alt+S` and go to `Build, Execution, Deployment -> Docker` and make sure docker is configured correctly/
4. Copy `server/src/main/resources/application.example.yml` to `server/src/main/resources/application.yml`. If you want to use docker instead, copy the `server/src/main/resources/application.docker.example.yml` to `server/src/main/resources/application.yml`.
5. The run configurations will be available in the top bar:
![Run Configurations](https://i.imgur.com/pO2SrPd.png)

### Run Configurations

1. DB & RabbitMQ: For starting the MongoDB and RabbitMQ containers.
2. Dev: To start the docker development server.
3. Production: To start the docker production server.
4. Tests: To run the tests.
5. Format: To format the project.
6. Assemble: To assemble the project binary.
7. Server: To start the server. (Might require DB & RabbitMQ to be running)
Loading

0 comments on commit 1e7373b

Please sign in to comment.