-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (35 loc) · 998 Bytes
/
main.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
name: Build & Run
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.x
uses: actions/setup-python@v1
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements/dev.txt
# - name: Set environment variables
# run: |
# export FLASK_APP=autoapp.py
- name: Initialize database & perform migrations
run: |
export FLASK_APP=autoapp.py
export FLASK_DEBUG=1
flask db stamp head
flask db migrate
flask db upgrade
# - name: Run application
# run: |
# export FLASK_APP=autoapp.py
# export FLASK_DEBUG=1
# flask run --with-threads
- name: Run tests
run: |
export FLASK_APP=autoapp.py
export FLASK_DEBUG=1
flask test