-
Notifications
You must be signed in to change notification settings - Fork 4
53 lines (43 loc) · 1.3 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
name: ci
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
opensearch: ['1.0.1', '2.0.1', 'latest']
security-enabled: ["true", "false"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- name: Checkout
- uses: actions/checkout@v4
- 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: Start OpenSearch
uses: ./.ci/opensearch
with:
port: 9250
opensearch-version: ${{ matrix.opensearch }}
security-enabled: ${{ matrix.security-enabled }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
run: pipx install poetry
- name: Install python dependencies
run: |
poetry env use ${{ matrix.python-version }}
poetry install --with dev
- name: Run unit tests
run: |
poetry run python -m unittest -v test
env:
port: 9250
opensearch-version: ${{ matrix.opensearch }}
security_enabled: ${{ matrix.security-enabled }}