Skip to content

Email templates

Email templates #2709

Workflow file for this run

name: tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.11" ]
steps:
- uses: actions/checkout@v3
- name: Install poetry
run: pipx install poetry
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'poetry'
- name: Install dependencies
run: |
poetry run pip install -U pip
poetry install
- name: check format with black
run: |
poetry run black --version
poetry run black --check .
- name: check import order with isort
run: |
poetry run isort --version
poetry run isort -c .
- name: Lint with pylint
run: |
poetry run pylint --version
poetry run pylint ephios
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [ "3.8", "3.9", "3.10", "3.11" ]
database: [ sqlite, mysql, postgres ]
include:
- database: sqlite
database_url: "sqlite:///data/db.sqlite3"
- database: mysql
database_url: "mysql://root:[email protected]:3306/ephios"
- database: postgres
database_url: "psql://pytest:[email protected]:5432"
steps:
- uses: actions/checkout@v3
- name: Install poetry
run: pipx install poetry
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'poetry'
- name: Install dependencies
run: |
sudo apt-get install gettext
poetry run pip install -U pip
poetry install --all-extras
poetry run pip install git+https://github.com/ephios-dev/ephios-testplugin
- name: Prepare files for test run
run: |
cp .env.example .env
poetry run python manage.py compilemessages
poetry run python manage.py collectstatic
poetry run python manage.py compilejsi18n
- name: Setup postgres # postgres 14 on ubuntu 22.04
run: |
sudo systemctl start postgresql.service
pg_isready
sudo -u postgres psql --command="CREATE USER pytest WITH CREATEDB PASSWORD 'pass'"
if: matrix.database == 'postgres'
- name: Setup mysql
run: |
sudo systemctl start mysql.service
mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -uroot -proot -Dmysql
if: matrix.database == 'mysql'
- name: Test apps
env:
DATABASE_URL: ${{ matrix.database_url }}
run: poetry run coverage run --source=ephios -m pytest tests/
- name: Coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: poetry run coveralls --service=github
if: matrix.python-version == '3.11' && matrix.database == 'sqlite'