Skip to content

Commit 96cfd6f

Browse files
Merge pull request #795 from decentraland/feat/add-worlds-multi-scene-support
feat: Add worlds multi scene support
2 parents 209f578 + 8362479 commit 96cfd6f

File tree

94 files changed

+3427
-1201
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+3427
-1201
lines changed

.github/workflows/pull-request.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,71 @@ jobs:
5656
tags: ${{ github.sha }}
5757
dockerfiles: |
5858
./Dockerfile
59+
60+
integration-tests:
61+
runs-on: ubuntu-latest
62+
63+
services:
64+
postgres:
65+
image: postgres:15
66+
env:
67+
POSTGRES_USER: postgres
68+
POSTGRES_PASSWORD: postgres
69+
POSTGRES_DB: places_test
70+
ports:
71+
- 5432:5432
72+
options: >-
73+
--health-cmd "pg_isready -U postgres"
74+
--health-interval 10s
75+
--health-timeout 5s
76+
--health-retries 5
77+
78+
localstack:
79+
image: localstack/localstack:latest
80+
env:
81+
SERVICES: sqs
82+
DEFAULT_REGION: us-east-1
83+
ports:
84+
- 4566:4566
85+
86+
env:
87+
CONNECTION_STRING: postgres://postgres:postgres@localhost:5432/places_test
88+
AWS_REGION: us-east-1
89+
AWS_ENDPOINT: http://localhost:4566
90+
QUEUE_URL: http://localhost:4566/000000000000/places_test
91+
AWS_ACCESS_KEY_ID: test
92+
AWS_SECRET_ACCESS_KEY: test
93+
94+
steps:
95+
- uses: actions/checkout@v2
96+
97+
- name: Reconfigure git to use HTTP authentication
98+
run: >
99+
git config --global url."https://github.com/".insteadOf "ssh://git@github.com/"
100+
101+
- name: node.js 18
102+
uses: actions/setup-node@v4.0.1
103+
with:
104+
node-version: 18.x
105+
registry-url: https://registry.npmjs.org/
106+
cache: "npm"
107+
108+
- name: installing
109+
run: npm install
110+
111+
- name: Create SQS queue in LocalStack
112+
run: |
113+
pip install awscli-local awscli
114+
awslocal sqs create-queue --queue-name places_test
115+
116+
- name: Run database migrations
117+
run: >
118+
./node_modules/.bin/node-pg-migrate
119+
--tsconfig ./tsconfig.json
120+
-j ts
121+
-m ./src/migrations
122+
-d CONNECTION_STRING
123+
up
124+
125+
- name: Run integration tests
126+
run: npm run test:integration

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,5 @@ static/light-theme.css
8181
static/semantic.min.css
8282
static/sw.js
8383
static/sw.js.map
84+
85+
.cursor

jest.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ module.exports = {
55
fakeTimers: {
66
enableGlobally: true,
77
},
8+
testPathIgnorePatterns: ["/node_modules/", "<rootDir>/test/"],
89
moduleNameMapper: {
910
"^decentraland-dapps/dist/modules/analytics/utils$":
1011
"<rootDir>/__mocks__/decentraland-dapps-analytics.js",

jest.integration.config.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// eslint-disable-next-line @typescript-eslint/no-var-requires
2+
const baseConfig = require("./jest.config")
3+
4+
module.exports = {
5+
...baseConfig,
6+
fakeTimers: {
7+
enableGlobally: false,
8+
},
9+
testMatch: ["<rootDir>/test/**/*.test.ts"],
10+
testPathIgnorePatterns: ["/node_modules/"],
11+
testTimeout: 30000,
12+
transform: {
13+
"^.+\\.tsx?$": [
14+
"ts-jest",
15+
{
16+
tsconfig: "tsconfig.test.json",
17+
},
18+
],
19+
},
20+
}

package-lock.json

Lines changed: 135 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"dependencies": {
1212
"@contentful/rich-text-react-renderer": "^16.1.6",
1313
"@dcl/hooks": "^1.0.0",
14-
"@dcl/schemas": "^22.2.0",
14+
"@dcl/schemas": "^22.4.0",
1515
"@sentry/browser": "^7.120.3",
1616
"@well-known-components/pushable-channel": "^1.0.3",
1717
"abort-controller": "^3.0.0",
@@ -66,6 +66,7 @@
6666
"@types/node": "^18.19.64",
6767
"@types/react": "^18.0.0",
6868
"@types/react-helmet": "^5.0.15",
69+
"@types/supertest": "^6.0.3",
6970
"@types/validator": "^13.7.5",
7071
"@types/web-push": "^3.3.2",
7172
"@types/xml": "^1.0.5",
@@ -91,14 +92,15 @@
9192
"lint-staged": "12.3.8",
9293
"nodemon": "^2.0.15",
9394
"prettier": "^2.6.2",
95+
"supertest": "^7.2.2",
9496
"ts-jest": "^29.2.5",
9597
"ts-node": "^10.8.0",
9698
"tsc-files": "^1.1.3",
9799
"typescript": "^5.9.3",
98100
"workbox-cli": "^6.5.2"
99101
},
100102
"overrides": {
101-
"@dcl/schemas": "^22.2.0"
103+
"@dcl/schemas": "^22.4.0"
102104
},
103105
"keywords": [
104106
"gatsby"
@@ -121,6 +123,7 @@
121123
"clean": "gatsby clean",
122124
"migrate": "./node_modules/.bin/node-pg-migrate --envPath ./.env.development --tsconfig ./tsconfig.json -j ts -m ./src/migrations -d CONNECTION_STRING",
123125
"test": "jest",
126+
"test:integration": "jest --config jest.integration.config.js --runInBand",
124127
"husky-setup": "husky install",
125128
"precommit": "lint-staged --config .husky/pre-commit.js",
126129
"lint": "eslint --ext .ts,.tsx,.js,.jsx ./src",

0 commit comments

Comments
 (0)