Locally all cypress tests working #13
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: e2e-tests | |
on: [push] | |
jobs: | |
cypress-run: | |
runs-on: ubuntu-latest | |
steps: | |
# - name: Checkout | |
# uses: actions/checkout@v3 | |
# | |
# - name: Install `serve` | |
# run: npm install -g serve | |
# | |
# - name: Start `serve` to host the app | |
# run: serve -s build -l 8900 & | |
# | |
# - name: Cypress run | |
# uses: cypress-io/github-action@v5 | |
# with: | |
# start: npm start | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20' | |
- name: Install dependencies | |
run: npm install | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' # Use the Python version compatible with your Flask app | |
- name: Install Flask dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install flask | |
- name: Start Flask server | |
run: | | |
FLASK_APP=applications/create_0dmodel/app.py flask run --host=0.0.0.0 --port=8901 & | |
sleep 10 # Wait for the server to start | |
- name: Run Cypress tests | |
uses: cypress-io/github-action@v5 | |
with: | |
start: npm start |