forked from pallets-eco/flask-session
-
Notifications
You must be signed in to change notification settings - Fork 8
62 lines (58 loc) · 1.6 KB
/
test.yaml
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
name: test
on:
push:
pull_request:
jobs:
test:
name: python ${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.7, 3.8, 3.9, '3.10']
fail-fast: true
steps:
- name: checkout
uses: actions/checkout@v3
- name: setup python ${{ matrix.python-version }} on ${{ matrix.os }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Start MongoDB
uses: supercharge/[email protected]
with:
mongodb-version: '5.0'
- name: Start MemCache
uses: niden/actions-memcached@v7
- name: Start Redis
uses: supercharge/[email protected]
with:
redis-version: 6
- name: Configure sysctl limits for elasticsearch
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 elasticsearch
uses: getong/[email protected]
with:
elasticsearch version: 8.3.3
host port: 9200
container port: 9200
host node port: 9300
node port: 9300
discovery type: single-node
- name: setup poetry
uses: abatilo/actions-poetry@v2
with:
poetry-version: 1.2.2
- name: install deps
run: poetry install
- name: test
run: poetry run tox -e test
- name: upload cov
uses: codecov/codecov-action@v3
with:
files: ./coverage.xml
verbose: true