-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial attempt at adding automated testing
- Loading branch information
1 parent
000982b
commit dca9b25
Showing
1 changed file
with
64 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: Run Tests | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
# TODO: Set up backend tests | ||
# backend-test: | ||
# runs-on: ubuntu-latest | ||
|
||
# steps: | ||
# - uses: actions/checkout@v4 | ||
|
||
# - name: Set up Python | ||
# uses: actions/setup-python@v3 | ||
# with: | ||
# python-version: "3.12" | ||
|
||
# - name: Set up Node.js | ||
# uses: actions/setup-node@v4 | ||
# with: | ||
# node-version: "22.x" | ||
|
||
# - name: Install Python dependencies | ||
# run: | | ||
# python -m pip install -U pip | ||
# pip install -U -r BackEndFlask/requirements.txt | ||
|
||
frontend-test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: "3.12" | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "22.x" | ||
|
||
- name: Install Python dependencies | ||
run: | | ||
python -m pip install -U pip | ||
pip install -U -r BackEndFlask/requirements.txt | ||
- name: Start backend | ||
run: | | ||
cd BackEndFlask | ||
python setupEnv.py -d | ||
python setupEnv.py -s & | ||
for attempt in {1..20}; do sleep 1; if curl 'http://localhost:5050/api'; then echo ready; break; fi; echo waiting...; done | ||
- name: Install Node dependencies | ||
run: | | ||
cd FrontEndReact | ||
npm install | ||
- name: Run Jest tests | ||
run: | | ||
cd FrontEndReact | ||
npm test |