Skip to content

🐞 Can't send email-otp #780

🐞 Can't send email-otp

🐞 Can't send email-otp #780

Workflow file for this run

name: test-python
on:
push:
branches:
- master
- '[0-9]+.[0-9]+.x'
tags:
- '**'
pull_request:
branches:
- master
- '[0-9]+.[0-9]+.x'
jobs:
py:
runs-on: ubuntu-20.04
container: ubuntu:20.04
services:
postgres:
image: postgres:12
env:
POSTGRES_USER: iam
POSTGRES_PASSWORD: iam
POSTGRES_DB: iam
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v2
- name: Install node
run: |
export TZ=UTC
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
apt update
apt install -y tzdata
apt install -y nodejs
- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: '15'
# Install local postgres if this action is being run locally through ACT,
# because right now ACT does not support services natively so we have to
# manually install, configure and launch it
# more about this: https://github.com/nektos/act/issues/173
- name: Install postgres in ACT
if: ${{ env.ACT }}
run: apt install -y postgresql postgresql-contrib sudo
- name: Boot postgres in ACT
if: ${{ env.ACT }}
run: |
service postgresql start
- name: Configure postgres in ACT
if: ${{ env.ACT }}
run: |
sudo -u postgres psql -U postgres -d postgres -c "alter user postgres with password 'password';"
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
apt install -y libfreetype6-dev python3-dev libjpeg-dev zlib1g-dev libpq-dev libssl-dev git gcc
python -m pip install --upgrade pip wheel
python -m pip install -r requirements.txt
python -m pip install coveralls
- name: coverage
run: |
cd iam
python manage.py migrate --settings=iam.test_settings
python manage.py loaddata --settings=iam.test_settings initial
python manage.py test --settings=iam.test_settings --failfast --nocapture
python -m coverage run --source='.' manage.py test --settings=iam.test_settings
env:
POSTGRES_HOST: postgres
POSTGRES_PORT: 5432