Skip to content

Commit febfc79

Browse files
committed
Modify Github workflow.
1 parent a2b7cca commit febfc79

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

.github/workflows/python-app.yml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33

44
name: Python application
55

6-
on: [push]
6+
on:
7+
push:
8+
branches: [master]
9+
pull_request:
10+
branches: [master]
711

812
jobs:
913
build:
@@ -19,6 +23,7 @@ jobs:
1923
- name: Install dependencies
2024
run: |
2125
python -m pip install --upgrade pip setuptools wheel
26+
pip install flake8 pytest
2227
pip install -r requirements.txt
2328
2429
- name: Lint with flake8
@@ -29,5 +34,17 @@ jobs:
2934
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
3035
3136
- name: Test with pytest
37+
env:
38+
ENVIRONMENT: ${{ secrets.ENVIRONMENT }}
39+
FLASK_APP: ${{ secrets.FLASK_APP }}
40+
FLASK_DEBUG: ${{ secrets.FLASK_DEBUG }}
41+
REDIS_URL: ${{ secrets.REDIS_URL }}
42+
SESSION_REDIS: ${{ secrets.SESSION_REDIS }}
43+
SQLALCHEMY_DATABASE_HOST: ${{ secrets.SQLALCHEMY_DATABASE_HOST }}
44+
SQLALCHEMY_DATABASE_NAME: ${{ secrets.SQLALCHEMY_DATABASE_NAME }}
45+
SQLALCHEMY_DATABASE_PEM: ${{ secrets.SQLALCHEMY_DATABASE_PEM }}
46+
SQLALCHEMY_DATABASE_TABLE: ${{ secrets.SQLALCHEMY_DATABASE_TABLE }}
47+
SQLALCHEMY_DATABASE_URI: ${{ secrets.SQLALCHEMY_DATABASE_URI }}
3248
run: |
33-
pytest
49+
python3 -m pip install pytest coverage
50+
pytest

0 commit comments

Comments
 (0)