forked from avrae/avrae
-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (51 loc) · 1.48 KB
/
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Test
on:
[ push, pull_request ]
jobs:
test:
runs-on: ubuntu-latest
services:
redis: # redis://redis:6379/0
image: redis
ports:
- 6379:6379
mongo: # mongodb://root:topsecret@mongo:27017
image: mongo
ports:
- 27017:27017
env:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: topsecret
env:
NO_DICECLOUD: 1
DISCORD_OWNER_USER_ID: "98765432109876543"
MONGO_URL: mongodb://root:topsecret@localhost:27017
REDIS_URL: redis://localhost:6379/0
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: Cache pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install Dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
pip install -r tests/requirements.txt
pip install flake8
mkdir shared
- name: Run Tests
run: pytest --cov=cogs5e --cov=cogsmisc --cov=utils --cov-report=xml:shared/coverage.xml tests/
env:
TESTING: 1
- name: Upload Coverage
uses: codecov/codecov-action@v1
with:
files: ./shared/coverage.xml