-
Notifications
You must be signed in to change notification settings - Fork 216
61 lines (55 loc) · 1.33 KB
/
test-cloud.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
name: Run tests for jac-cloud
on:
pull_request:
paths:
- "jac-cloud/**"
push:
branches:
- main
paths:
- "jac-cloud/**"
jobs:
test-cloud:
runs-on: ubuntu-latest
defaults:
run:
working-directory: jac-cloud
env:
SHOW_ENDPOINT_RETURNS: true
services:
redis:
image: redis
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379
steps:
- name: Start MongoDB
uses: supercharge/[email protected]
with:
mongodb-replica-set: test-rs
- name: Check out code
uses: actions/checkout@v2
- name: Set up Python 3.12
uses: actions/setup-python@v2
with:
python-version: 3.12.4
- name: Install dependencies
run: |
python -m pip install --upgrade pip
cd ../jac
pip install -e .
cd ../jac-cloud
pip install -e .
pip install pytest
- name: Run tests without mongodb and redis
run: pytest -sx
- name: Run tests with mongodb and redis
run: pytest -sx
env:
SHOW_ENDPOINT_RETURNS: true
DATABASE_HOST: mongodb://localhost/?retryWrites=true&w=majority
REDIS_HOST: redis://localhost