Skip to content

Commit 80eb313

Browse files
committed
add elastic search on github actions
1 parent 2c6332b commit 80eb313

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

.github/workflows/nodejs.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ jobs:
1010
matrix:
1111
node-version: [12.x, 14.x]
1212
mongodb-version: [4.0, 4.2]
13+
elasticsearch-version: ['7.9.3']
1314

1415
steps:
1516
- uses: actions/checkout@v1
@@ -21,6 +22,21 @@ jobs:
2122
uses: wbari/[email protected]
2223
with:
2324
mongoDBVersion: ${{ matrix.mongodb-version }}
25+
- name: Configure sysctl limits
26+
run: |
27+
sudo swapoff -a
28+
sudo sysctl -w vm.swappiness=1
29+
sudo sysctl -w fs.file-max=262144
30+
sudo sysctl -w vm.max_map_count=262144
31+
- name: Launch elasticsearch
32+
uses: getong/[email protected]
33+
with:
34+
elasticsearch version: ${{ matrix.elasticsearch-version }}
35+
host port: 9200
36+
container port: 9200
37+
host node port: 9300
38+
node port: 9300
39+
discovery type: 'single-node'
2440
- name: npm install, build, and test
2541
run: |
2642
npm install

0 commit comments

Comments
 (0)