Skip to content

updated user query to select Active Standard users #59

updated user query to select Active Standard users

updated user query to select Active Standard users #59

Workflow file for this run

name: Unit Tests
on:
workflow_dispatch:
pull_request:
types: [opened, synchronize, reopened] # Default
env:
SALESFORCE_CONSUMER_KEY: foo
SALESFORCE_CLIENT_SECRET: foo
DB_ENCRYPTION_KEY: ${{ secrets.DB_ENCRYPTION_KEY }}
DJANGO_HASHID_SALT: ${{ secrets.DJANGO_HASHID_SALT }}
DJANGO_SETTINGS_MODULE: config.settings.test
POSTGRES_PORT: 5432
REDIS_HOST: localhost
REDIS_PORT: 6379
REDIS_URL: redis://localhost:6379
GITHUB_CLIENT_ID: NO_GITHUB_CLIENT
GITHUB_CLIENT_SECRET: NO_GITHUB_SECRET
DATABASE_URL: postgres://postgres:postgres@localhost:5432/github_actions
jobs:
unit-tests:
name: Unit tests
runs-on: sfdc-ubuntu-latest
env:
YARN_CACHE_DIR: ~/.yarn_cache
services:
postgres:
image: postgres
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: github_actions
# Set health check to wait until postgres has started
options: >-
--health-cmd pg_isready --health-interval 10s --health-timeout 5s
--health-retries 5
ports:
- 5432:5432
redis:
image: redis
options: >-
--health-cmd "redis-cli ping" --health-interval 10s --health-timeout
5s --health-retries 10
ports:
- 6379:6379
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Set up python 3.9
id: py
uses: actions/setup-python@v4
with:
python-version: "3.9"
cache: pip
cache-dependency-path: "requirements/*.txt"
- name: Install Python dependencies
run: |
pip install -r requirements/prod.txt
pip install -r requirements/dev.txt
- name: Run migrations
run: python manage.py migrate
- name: Check for migrations
run: python manage.py makemigrations --check --dry-run
- name: Run Pytest
run: pytest