Skip to content

Commit 6b31e4d

Browse files
authored
Merge pull request #98 from CodelyTV/part_five
Part five
2 parents d9f9adf + d2ea21d commit 6b31e4d

File tree

184 files changed

+2494
-1132
lines changed

Some content is hidden

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

184 files changed

+2494
-1132
lines changed

.github/workflows/nodejs.yml

+18-4
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ jobs:
88

99
strategy:
1010
matrix:
11-
node-version: [12.x, 14.x]
12-
mongodb-version: [4.0, 4.2]
11+
node-version: [12.x, 15.x]
12+
mongodb-version: [4.2]
1313
elasticsearch-version: ['7.9.3']
14+
rabbitmq-version: ['3.8.2-management-alpine']
1415

1516
steps:
1617
- uses: actions/checkout@v1
@@ -22,6 +23,10 @@ jobs:
2223
uses: wbari/[email protected]
2324
with:
2425
mongoDBVersion: ${{ matrix.mongodb-version }}
26+
- name: Launch RabbitMQ
27+
uses: nijel/[email protected]
28+
with:
29+
rabbitmq version: ${{ matrix.rabbitmq-version }}
2530
- name: Configure sysctl limits
2631
run: |
2732
sudo swapoff -a
@@ -37,11 +42,20 @@ jobs:
3742
host node port: 9300
3843
node port: 9300
3944
discovery type: 'single-node'
40-
- name: npm install, build, and test
45+
- name: npm install
4146
run: |
4247
npm install
48+
- name: npm run build
49+
run: |
4350
npm run build --if-present
4451
npm run lint
52+
- name: npm test
53+
run: |
4554
npm test
55+
- name: Cypress run
56+
uses: cypress-io/github-action@v1
4657
env:
47-
CI: true
58+
NODE_ENV: end2end
59+
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
60+
with:
61+
start: npm run cypress:ci:start

Makefile

+5-1
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,14 @@ start-mooc-backend: build
3838
start-backoffice-frontend: build
3939
docker-compose up $(BACKOFFICE_APP_NAME)-frontend && docker-compose down
4040

41+
# Start backoffice backend app
42+
start-backoffice-backend: build
43+
docker-compose up $(BACKOFFICE_APP_NAME)-backend && docker-compose down
44+
4145
# Clean containers
4246
clean:
4347
docker-compose down --rmi local --volumes --remove-orphans
4448

4549
# Start databases containers in background
4650
start_database:
47-
docker-compose up -d mongo elasticsearch
51+
docker-compose up -d mongo elasticsearch rabbitmq

cypress.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
{
2+
"baseUrl": "http://localhost:8032",
23
"video": false,
34
"screenshotOnRunFailure": false,
45
"testFiles": "**/*.cypress.*",
56
"integrationFolder": "tests/apps",
67
"fixturesFolder": "tests/utils/cypress/fixtures",
7-
"pluginsFile": "tests/utils/cypress/plugins/index.ts"
8+
"pluginsFile": "tests/utils/cypress/plugins/index.ts",
9+
"experimentalStudio": true
810
}

docker-compose.yml

+13-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ services:
1919

2020
mooc-backend:
2121
<<: *default-app
22-
command: bash -c "npm run build && npm run start"
22+
command: bash -c "npm run build && npm run start:mooc:backend"
2323
ports:
2424
- 3000:3000
2525

@@ -29,6 +29,12 @@ services:
2929
ports:
3030
- 8032:8032
3131

32+
backoffice-backend:
33+
<<: *default-app
34+
command: bash -c "npm run build && npm run start:backoffice:backend"
35+
ports:
36+
- 3001:3000
37+
3238
mongo:
3339
image: mongo:3.4.6
3440
volumes:
@@ -62,6 +68,12 @@ services:
6268
ports:
6369
- 5601:5601
6470

71+
rabbitmq:
72+
image: 'rabbitmq:3.8-management'
73+
ports:
74+
- 5672:5672
75+
- 15672:15672
76+
6577
volumes:
6678
node_modules:
6779
esdata:

0 commit comments

Comments
 (0)