-
Notifications
You must be signed in to change notification settings - Fork 5
58 lines (46 loc) · 1.53 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
name: ci
on: [ push, pull_request ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [ "3.9", "3.10", "3.11", "3.12" ]
opensearch: ['1.0.1', '2.0.1', 'latest']
security-enabled: ["true", "false"]
steps:
- 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 pytest --cov=abcd --cov-report xml --cov-report term:skip-covered
env:
port: 9250
security_enabled: ${{ matrix.security-enabled }}
opensearch-version: ${{ matrix.opensearch }}
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.4.1
with:
token: ${{ secrets.CODECOV_TOKEN }}