Add SMTP config validation in UserEmailPlugin #19051
Workflow file for this run
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
name: Pytest | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
paths: | |
- "**.py" | |
- Dockerfile | |
- requirements_dev.txt | |
- "saleor/**" | |
- ".github/workflows/pytest.yml" | |
push: | |
branches: | |
- main | |
- ci/* | |
paths: | |
- "**.py" | |
- Dockerfile | |
- requirements_dev.txt | |
- "saleor/**" | |
env: | |
BENCH_PATH: ./queries-results.json | |
DATABASE_URL: "postgres://saleor:saleor@postgres:5432/saleor" | |
SECRET_KEY: ci-test | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
container: python:3.9 | |
services: | |
postgres: | |
image: postgres | |
env: | |
POSTGRES_PASSWORD: saleor | |
POSTGRES_USER: saleor | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install system dependencies | |
run: apt-get install -y libpq-dev | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements_dev.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
# To remove once the issue is resolved. | |
- name: Install dependencies | |
run: | | |
python -m pip install wheel | |
python -m pip install -r requirements_dev.txt | |
- name: Run tests | |
run: | | |
pytest \ | |
--cov \ | |
--junitxml=junit/test-results.xml \ | |
--django-db-bench=${{ env.BENCH_PATH }} | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pre-commit | |
key: ${{ runner.os }}-pre-commit-${{ hashFiles('**/.pre-commit-config.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pre-commit- | |
# Publish coverage and test results | |
- uses: codecov/codecov-action@v2 | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: pytest-results | |
path: junit/test-results.xml | |
if: ${{ always() }} | |
# Publish detected differences as comment | |
- uses: NyanKiyoshi/pytest-django-queries-ci-tools@v1 | |
with: | |
query_raw_dump_path: ${{ env.BENCH_PATH }} | |
diff_endpoint: "https://dtab784j47g1o.cloudfront.net/default/saleor-db-queries-bot-diff" | |
diff_results_base_url: "https://dtab784j47g1o.cloudfront.net" | |
if: github.event_name == 'pull_request' && github.repository == 'saleor/saleor' | |
# Save results for future comparison against pull requests | |
- uses: NyanKiyoshi/pytest-django-queries-ci-tools@v1 | |
with: | |
query_raw_dump_path: ${{ env.BENCH_PATH }} | |
upload_endpoint: ${{ secrets.QUERIES_UPLOAD_ENDPOINT_URL }} | |
upload_secret_key: ${{ secrets.QUERIES_UPLOAD_SECRET }} | |
if: github.event_name == 'push' && github.repository == 'saleor/saleor' | |
# Run linters and Django related checks | |
# `git config` command is a workaround for https://github.com/actions/runner-images/issues/6775 | |
- name: Run Linters and Checks | |
run: | | |
git config --global --add safe.directory "$GITHUB_WORKSPACE" | |
pre-commit run --all | |
if: ${{ always() }} |