Skip to content

Merge branch 'main' into ARM-572-Manage-i18n-in-the-frontend #2

Merge branch 'main' into ARM-572-Manage-i18n-in-the-frontend

Merge branch 'main' into ARM-572-Manage-i18n-in-the-frontend #2

Workflow file for this run

name: Startup test using Playwright
on:
push:
pull_request:
branches: [develop, main]
jobs:
build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:14.1
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }}
POSTGRES_DB: postgres
ports: ['5432:5432']
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.11
uses: actions/setup-python@v2
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
sudo apt install gettext
pip install -r requirements.txt
- name: Ensure browsers are installed
run: python -m playwright install
- name: Install operating system dependencies
run: python -m playwright install-deps
- name: Create env variables
run: |
touch .env
echo DJANGO_SECRET_KEY=${{ secrets.DJANGO_SECRET_KEY }} >> .env
echo POSTGRES_NAME=postgres >> .env
echo POSTGRES_USER=postgres >> .env
echo POSTGRES_PASSWORD=${{ secrets.POSTGRES_PASSWORD }} >> .env
echo DB_HOST=localhost >> .env
echo EMAIL_HOST=localhost >> .env
echo EMAIL_PORT=1025 >> .env
echo EMAIL_HOST_USER='' >> .env
echo EMAIL_HOST_PASSWORD='' >> .env
#echo EMAIL_USE_TLS=False >> .env
echo [email protected] >> .env
echo DJANGO_SUPERUSER_PASSWORD=root >> .env
echo MIRA_URL=http://127.0.0.1:8000 >> .env
echo DEFAULT_FROM_EMAIL='[email protected]' >> .env
echo MIRA_SUPERUSER_EMAIL='' >> .env
echo RECAPTCHA_PUBLIC_KEY=MyRecaptchaKey123 >> .env
echo RECAPTCHA_PRIVATE_KEY=MyRecaptchaPrivateKey456 >> .env
- name: Setup environment
run: |
export $(grep -v '^#' .env | xargs)
python manage.py makemigrations
python manage.py migrate
python manage.py compilemessages
python manage.py makemessages -l fr
python manage.py createsuperuser --no-input
- name: Run server
run: |
export $(grep -v '^#' .env | xargs)
python manage.py runserver &
- name: Run test
run: |
export $(grep -v '^#' .env | xargs)
pytest asfTest/test/test_installation.py --browser chromium