CI - add end-2-end tests job
This commit is contained in:
parent
64cc568958
commit
600c5ab8c6
35
.github/workflows/.tests.yml
vendored
35
.github/workflows/.tests.yml
vendored
@ -67,3 +67,38 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
cd fittrackee_client
|
cd fittrackee_client
|
||||||
yarn test:unit
|
yarn test:unit
|
||||||
|
|
||||||
|
end2end:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: ["python", "javascript"]
|
||||||
|
container: python:3.10
|
||||||
|
services:
|
||||||
|
postgres:
|
||||||
|
image: postgres:latest
|
||||||
|
env:
|
||||||
|
POSTGRES_DB: fittrackee_test
|
||||||
|
POSTGRES_USER: fittrackee
|
||||||
|
POSTGRES_PASSWORD: fittrackee
|
||||||
|
options: >-
|
||||||
|
--health-cmd pg_isready
|
||||||
|
--health-interval 10s
|
||||||
|
--health-timeout 5s
|
||||||
|
--health-retries 5
|
||||||
|
selenium:
|
||||||
|
image: selenium/standalone-firefox
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Install Poetry and Dependencies
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
pip install --quiet poetry
|
||||||
|
poetry config virtualenvs.create false
|
||||||
|
poetry install --no-interaction --quiet
|
||||||
|
- name: Run migrations
|
||||||
|
run: flask db upgrade --directory fittrackee/migrations
|
||||||
|
- name: Start application and run tests with Selenium
|
||||||
|
run: |
|
||||||
|
setsid nohup flask run --with-threads -h 0.0.0.0 -p 5000 >> nohup.out 2>&1 &
|
||||||
|
export TEST_APP_URL=http://$(hostname --ip-address):5000
|
||||||
|
sleep 5
|
||||||
|
pytest e2e --driver Remote --capability browserName firefox --host selenium --port 4444
|
||||||
|
Loading…
Reference in New Issue
Block a user