-
Notifications
You must be signed in to change notification settings - Fork 7
56 lines (45 loc) · 1.29 KB
/
CI.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: elasticmaps CI
on: [push, pull_request]
jobs:
pre_build:
runs-on: ubuntu-20.04
steps:
- uses: fkirc/skip-duplicate-actions@master
with:
github_token: ${{ github.token }}
build:
needs: pre_build
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Configure sysctl limits
run: |
sudo swapoff -a
sudo sysctl -w vm.swappiness=1
sudo sysctl -w fs.file-max=262144
sudo sysctl -w vm.max_map_count=262144
- name: Runs Elasticsearch
uses: miyataka/elastic-github-actions/elasticsearch@feature/plugin_support
with:
stack-version: 7.17.1
plugins: analysis-kuromoji
- name: Elasticsearch is reachable
run: |
curl --verbose --show-error http://localhost:9200
- run: npm install
- run: npm run coverage
notify:
name: Notify Slack
needs: build
if: ${{ success() || failure() }}
runs-on: ubuntu-20.04
steps:
- uses: iRoachie/[email protected]
if: env.SLACK_WEBHOOK_URL != null
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_BUILDS_WEBHOOK_URL }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}