forked from inaturalist/iNaturalistAPI
-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (57 loc) · 1.64 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
57
58
59
60
61
62
63
64
65
66
67
68
name: iNaturalstAPI CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-20.04
services:
postgres:
image: postgis/postgis:11-2.5
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: inaturalist_test
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
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
- name: Copy config
run: |
cp config.js.ci config.js
touch vision-taxa.txt
- run: npm install
- run: npm run coverage
env:
PGHOST: 0.0.0.0
PGUSER: postgres
PGPASSWORD: postgres
CI: true
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 }}