diff --git a/.github/workflows/server.yml b/.github/workflows/server.yml index a30caadf6..d7a940759 100644 --- a/.github/workflows/server.yml +++ b/.github/workflows/server.yml @@ -2,14 +2,14 @@ name: Server Test, Build, & Deploy on: push: - branches: + branches: - "staging" - "release/*" paths: - "server/**" - "common/**" pull_request: - branches: + branches: - "staging" - "release/*" paths: @@ -47,9 +47,6 @@ jobs: - uses: supercharge/mongodb-github-action@1.4.1 - uses: supercharge/redis-github-action@1.1.0 - - name: Move Config File - run: mv ./.github/test.conf.json5 ./test.conf.json5 - - name: Run Tests run: pnpm test env: diff --git a/server/.gitignore b/server/.gitignore index 58a7395b8..fa68a57b7 100644 --- a/server/.gitignore +++ b/server/.gitignore @@ -13,3 +13,4 @@ scripts/validate-database-errs/* local-cdn test-cdn +!test.conf.json5 \ No newline at end of file diff --git a/server/test.conf.json5 b/server/test.conf.json5 new file mode 100644 index 000000000..3f7c251f9 --- /dev/null +++ b/server/test.conf.json5 @@ -0,0 +1,81 @@ +// Config file that the CI deployment uses. This is moved to $pwd/conf.json5 before CI tests are ran. + +{ + MONGO_DATABASE_NAME: "testingdb", + CAPTCHA_SECRET_KEY: "unused", + SESSION_SECRET: "unused", + FLO_API_URL: "https://flo.example.com", + EAG_API_URL: "https://eag.example.com", + MIN_API_URL: "https://min.example.com", + ARC_API_URL: "https://arc.example.com", + FLO_OAUTH2_INFO: { + CLIENT_ID: "DUMMY_CLIENT_ID", + CLIENT_SECRET: "DUMMY_CLIENT_SECRET", + REDIRECT_URI: "https://example.com", + }, + EAG_OAUTH2_INFO: { + CLIENT_ID: "DUMMY_CLIENT_ID", + CLIENT_SECRET: "DUMMY_CLIENT_SECRET", + REDIRECT_URI: "https://example.com", + }, + ARC_AUTH_TOKEN: "unused", + ENABLE_SERVER_HTTPS: false, + OUR_URL: "https://example.com", + INVITE_CODE_CONFIG: { + BATCH_SIZE: 2, + INVITE_CAP: 100, + BETA_USER_BONUS: 5, + }, + CDN_CONFIG: { + WEB_LOCATION: "/cdn", + SAVE_LOCATION: { + TYPE: "LOCAL_FILESYSTEM", + LOCATION: "./test-cdn", + SERVE_OWN_CDN: true, + }, + }, + TACHI_CONFIG: { + TYPE: "omni", + NAME: "Tachi Testing", + GAMES: [ + "iidx", + "museca", + "maimai", + "sdvx", + "ddr", + "bms", + "chunithm", + "usc", + "wacca", + "popn", + "jubeat", + "pms", + ], + IMPORT_TYPES: [ + "file/eamusement-iidx-csv", + "file/batch-manual", + "file/solid-state-squad", + "file/mer-iidx", + "file/pli-iidx-csv", + "ir/direct-manual", + "ir/barbatos", + "ir/fervidex", + "ir/fervidex-static", + "ir/beatoraja", + "ir/usc", + "ir/kshook-sv6c", + "api/arc-iidx", + "api/arc-sdvx", + "api/eag-iidx", + "api/eag-sdvx", + "api/flo-iidx", + "api/flo-sdvx", + "api/min-sdvx", + ], + }, + LOGGER_CONFIG: { + FILE: false, + CONSOLE: true, + LOG_LEVEL: "info", + }, +}