Skip to content

Commit 538b8fb

Browse files
committed
- general adjustments
1 parent 167b865 commit 538b8fb

File tree

5 files changed

+19
-8
lines changed

5 files changed

+19
-8
lines changed

.github/workflows/deploy.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
JWT_SECRET_KEY: ${{ secrets.JWT_SECRET_KEY }}
4444
SECRET_KEY: ${{ secrets.SECRET_KEY }}
4545
run: |
46-
source ../venv/bin/activate
46+
source venv/bin/activate
4747
pytest --disable-warnings
4848
4949
build-frontend:
@@ -67,6 +67,9 @@ jobs:
6767
working-directory: ./frontend
6868
run: npm run build
6969

70+
- name: List files
71+
run: ls -la ./frontend/dist
72+
7073
deploy-frontend:
7174
runs-on: ubuntu-latest
7275
needs: build-frontend

backend/app.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,13 @@
55
from flask_jwt_extended import JWTManager
66
from log_config import setup_logging
77

8-
def create_app():
8+
def create_app(test_config=None):
99
app = Flask(__name__)
10-
app.config.from_object(Config)
10+
11+
if test_config:
12+
app.config.update(test_config)
13+
else:
14+
app.config.from_object(Config)
1115

1216
# Inicializa o MongoDB
1317
init_mongo(app)

backend/tests/conftest.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,9 @@
1010

1111
@pytest.fixture
1212
def app():
13-
app = create_app()
14-
app.config.update({
13+
app = create_app({
1514
"TESTING": True,
16-
"MONGO_URI": 'mongodb://localhost:27017/jreport'
15+
"MONGO_URI": os.getenv('MONGO_URI', "mongodb://localhost:27017/jprogram")
1716
})
1817
return app
1918

frontend/vue.config.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
outputDir : 'dist',
3+
publicPath: process.env.NODE_ENV === 'production' ? '/jreport/' : '/'
4+
}
5+

run/backend.bat

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ if not exist "%diretorioVerificar%venv" (
1313

1414
cd /d "%diretorioVerificar%"
1515

16-
::
1716
call venv\Scripts\activate
1817

18+
python -m pip install --upgrade pip
19+
1920
pip install -r requirements.txt
2021

2122
python app.py
@@ -24,4 +25,3 @@ python app.py
2425
pause
2526

2627
endlocal
27-
pause

0 commit comments

Comments
 (0)