-
Notifications
You must be signed in to change notification settings - Fork 9
63 lines (52 loc) · 1.69 KB
/
python-publish.yml
File metadata and controls
63 lines (52 loc) · 1.69 KB
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
name: AIforGood ModelServer Tests
on: [push]
jobs:
# Label of the container job
qa:
name: Unit Test
# Containers must run in Linux based operating systems
runs-on: ubuntu-18.04
# Docker Hub image that `container-job` executes in
container: python:3.7.9-buster
# Service containers to run with `container-job`
services:
# Label used to access the service container
redis:
# Docker Hub image
image: redis
# Set health checks to wait until redis has started
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v1
- name: Set up Python
uses: actions/setup-python@master
with:
python-version: 3.7
- name: Set up dependancies
run: |
pip install -r requirements.txt
#pip install selenium
- name: Run unit tests
run: |
chmod 755 ./run_tests.sh
./run_tests.sh
env:
# The hostname used to communicate with the Redis service container
REDIS_URL: 'rediss://redis'
DATABASE_HOST: 'url'
SECRET_KEY: 'secret'
- name: Wemake Python Stylguide
uses: wemake-services/wemake-python-styleguide@0.14.1
continue-on-error: true
with:
reporter: 'github-pr-review'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - name: Run acceptance tests
# run: |
# waitress-serve --port 8050 --host 0.0.0.0 ai4good.webapp.server:flask_app
# python ai4good/webapp/tests/basic_web_test.py