Skip to content

Changed python version #4

Changed python version

Changed python version #4

Workflow file for this run

name: Flask App Test
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.8.8'
- name: List directories
run: ls -R
- name: Install dependencies
working-directory: e_invoice
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run Flask app
working-directory: e_invoice
run: |
nohup flask run & # Start Flask application in the background
- name: Test /login route
run: |
sleep 10 # Wait for the server to start
curl -s --head http://127.0.0.1:5000/login | head -n 10 # Check if /login returns HTML
- name: Stop Flask app
run: |
pkill -f 'flask run' # Stop the Flask app