forked from opensearch-project/opensearch-go
-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (55 loc) · 1.83 KB
/
test-integration.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
name: Integration
on: [push, pull_request]
env:
GITHUB_ACTIONS: true
jobs:
test:
name: Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with: { fetch-depth: 1 }
- uses: actions/setup-go@v3
with: { go-version: '1.x' }
- run: go version
- name: Increase system 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: Launch OpenSearch cluster
run: |
make cluster.clean cluster.build cluster.start
for attempt in `seq 25`; do sleep 5; \
if curl -s localhost:9200; \
then echo '=====> ready'; break; fi; if [ $attempt == 25 ]; then exit 1; fi; echo '=====> waiting...'; done
- run: make test-integ race=true coverage=true
- uses: codecov/codecov-action@v3
with:
file: tmp/integ.cov
flags: integration
secured:
name: Tests against secure cluster
runs-on: ubuntu-latest
env:
SECURE_INTEGRATION: true
steps:
- uses: actions/checkout@v3
with: { fetch-depth: 1 }
- uses: actions/setup-go@v3
with: { go-version: '1.x' }
- run: go version
- name: Increase system 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: Launch OpenSearch cluster
run: |
make cluster.clean cluster.build cluster.start
for attempt in `seq 25`; do sleep 5; \
if curl -s -ku admin:admin https://localhost:9200; \
then echo '=====> ready'; break; fi; if [ $attempt == 25 ]; then exit 1; fi; echo '=====> waiting...'; done
- run: make test-integ-secure