forked from smari/wasa2il
-
Notifications
You must be signed in to change notification settings - Fork 16
55 lines (48 loc) · 1.67 KB
/
python-app.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
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Python application
on:
push:
branches: [ development ]
pull_request:
branches: [ development ]
jobs:
build:
runs-on: ubuntu-latest
services:
mysql:
image: mysql:5.7
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
#MYSQL_DATABASE: laravel_tags
ports:
- 3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest mysqlclient
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Run tests
run: |
python manage.py test -v 2
env:
W2_DATABASE_HOST: 127.0.0.1
W2_DATABASE_PORT: ${{ job.services.mysql.ports[3306] }}
W2_DATABASE_PASSWORD:
W2_DATABASE_USER: root
W2_SECRET_KEY: supersecretkey-only-used-for-testing
- name: Deploy to heroku
if: false # Heroku Github integration is temporarily broken because of a security issue
uses: akhileshns/[email protected] # This is the action
with:
heroku_api_key: ${{ secrets.HEROKU_API_KEY }}
heroku_app_name: 'wasa2il-development'
heroku_email: ${{ secrets.MY_EMAIL }}
branch: 'development'