-
Notifications
You must be signed in to change notification settings - Fork 104
65 lines (63 loc) · 1.61 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
58
59
60
61
62
63
64
65
---
name: Zou CI
on:
pull_request:
branches:
- master
push:
branches:
- master
jobs:
ci:
name: Test with different versions of Python 🐍
runs-on: ubuntu-22.04
env:
INDEXER_KEY: testkey0123456789
PGPASSWORD: mysecretpassword
strategy:
fail-fast: false
matrix:
version: [3.8, 3.11]
container: ${{ matrix.container }}
services:
postgres:
image: "postgres:12.16"
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
env:
POSTGRES_PASSWORD: ${{ env.PGPASSWORD }}
steps:
- uses: actions/checkout@v4
- name: Install ffmpeg
run: |
sudo apt-get update
sudo apt install -y ffmpeg
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.version }}
cache: pip
- name: Upgrade pip 📦
run: >-
pip install --upgrade pip setuptools
- name: Install packages 📦
run: >-
pip install -r requirements.txt
- name: Create database 🗄
run: >-
psql -c 'create database zoudb;' -U postgres -h 127.0.0.1
- name: Launch docker for meilisearch 🐳
run: |
docker pull getmeili/meilisearch:v1.1
docker run -it --rm -d -p 7700:7700 -e MEILI_MASTER_KEY=$INDEXER_KEY getmeili/meilisearch:v1.1
- name: Run tests 🧪
run: >-
py.test
env:
DEBUG: 1
MAIL_DEBUG: 1