-
Notifications
You must be signed in to change notification settings - Fork 3
37 lines (34 loc) · 983 Bytes
/
test.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
name: Test Code
on:
- push
jobs:
test:
if: github.event_name == 'push'
runs-on: ubuntu-latest
name: Unit tests in Docker
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: Run Elasticsearch
uses: elastic/elastic-github-actions/elasticsearch@master
with:
stack-version: 8.8.2
security-enabled: false
- name: Elasticsearch is reachable
run: |
curl --verbose --show-error http://localhost:9200
- name: Install python dependencies
run: |
pip install -r requirements.txt
pip install -r requirements-dev.txt
- name: Install fixtures
run: |
python -m test.create_fixtures
- name: Run all tests
run: |
pytest