CI #250
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: CI | |
on: | |
push: | |
branches: [ "prod" ] | |
pull_request: | |
branches: [ "prod" ] | |
workflow_dispatch: | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: true | |
matrix: | |
os: ["ubuntu-latest"] | |
python-version: ["3.11"] | |
redis-version: ["7"] | |
env: | |
API_CSRF_KEY: ${{ secrets.API_CSRF_KEY }} | |
API_ENCRYPTION_KEY: ${{ secrets.API_ENCRYPTION_KEY }} | |
API_SECRET_KEY: ${{ secrets.API_SECRET_KEY }} | |
AUTH0_API_AUDIENCE: ${{ secrets.AUTH0_API_AUDIENCE }} | |
AUTH0_DOMAIN: ${{ secrets.AUTH0_DOMAIN }} | |
AUTH0_FIRST_ADMIN: ${{ secrets.AUTH0_FIRST_ADMIN }} | |
AUTH0_FIRST_ADMIN_AUTH_ID: ${{ secrets.AUTH0_FIRST_ADMIN_AUTH_ID }} | |
AUTH0_FIRST_ADMIN_PASSWORD: ${{ secrets.AUTH0_FIRST_ADMIN_PASSWORD }} | |
AUTH0_FIRST_CLIENT_A: ${{ secrets.AUTH0_FIRST_CLIENT_A }} | |
AUTH0_FIRST_CLIENT_A_AUTH_ID: ${{ secrets.AUTH0_FIRST_CLIENT_A_AUTH_ID }} | |
AUTH0_FIRST_CLIENT_A_PASSWORD: ${{ secrets.AUTH0_FIRST_CLIENT_A_PASSWORD }} | |
AUTH0_FIRST_CLIENT_B: ${{ secrets.AUTH0_FIRST_CLIENT_B }} | |
AUTH0_FIRST_CLIENT_B_AUTH_ID: ${{ secrets.AUTH0_FIRST_CLIENT_B_AUTH_ID }} | |
AUTH0_FIRST_CLIENT_B_PASSWORD: ${{ secrets.AUTH0_FIRST_CLIENT_B_PASSWORD }} | |
AUTH0_FIRST_EMPLOYEE: ${{ secrets.AUTH0_FIRST_EMPLOYEE }} | |
AUTH0_FIRST_EMPLOYEE_AUTH_ID: ${{ secrets.AUTH0_FIRST_EMPLOYEE_AUTH_ID }} | |
AUTH0_FIRST_EMPLOYEE_PASSWORD: ${{ secrets.AUTH0_FIRST_EMPLOYEE_PASSWORD }} | |
AUTH0_FIRST_MANAGER: ${{ secrets.AUTH0_FIRST_MANAGER }} | |
AUTH0_FIRST_MANAGER_AUTH_ID: ${{ secrets.AUTH0_FIRST_MANAGER_AUTH_ID }} | |
AUTH0_FIRST_MANAGER_PASSWORD: ${{ secrets.AUTH0_FIRST_MANAGER_PASSWORD }} | |
AUTH0_FIRST_USER_UNVERIFIED: ${{ secrets.AUTH0_FIRST_USER_UNVERIFIED }} | |
AUTH0_FIRST_USER_UNVERIFIED_AUTH_ID: ${{ secrets.AUTH0_FIRST_USER_UNVERIFIED_AUTH_ID }} | |
AUTH0_FIRST_USER_UNVERIFIED_PASSWORD: ${{ secrets.AUTH0_FIRST_USER_UNVERIFIED_PASSWORD }} | |
AUTH0_FIRST_USER_VERIFIED: ${{ secrets.AUTH0_FIRST_USER_VERIFIED }} | |
AUTH0_FIRST_USER_VERIFIED_AUTH_ID: ${{ secrets.AUTH0_FIRST_USER_VERIFIED_AUTH_ID }} | |
AUTH0_FIRST_USER_VERIFIED_PASSWORD: ${{ secrets.AUTH0_FIRST_USER_VERIFIED_PASSWORD }} | |
AUTH0_M2M_CLIENT_ID: ${{ secrets.AUTH0_M2M_CLIENT_ID }} | |
AUTH0_M2M_CLIENT_SECRET: ${{ secrets.AUTH0_M2M_CLIENT_SECRET }} | |
AUTH0_SPA_CLIENT_ID: ${{ secrets.AUTH0_SPA_CLIENT_ID }} | |
AUTH0_SPA_CLIENT_SECRET: ${{ secrets.AUTH0_SPA_CLIENT_SECRET }} | |
CELERY_SENTRY_DSN: ${{ secrets.CELERY_SENTRY_DSN }} | |
CLOUDKEY_GOOGLE_API: ${{ secrets.CLOUDKEY_GOOGLE_API }} | |
EMAIL_ENABLED: ${{ secrets.EMAIL_ENABLED }} | |
EMAIL_FROM_EMAIL: ${{ secrets.EMAIL_FROM_EMAIL }} | |
EMAIL_FROM_NAME: ${{ secrets.EMAIL_FROM_NAME }} | |
EMAIL_SMTP_PASSWORD: ${{ secrets.EMAIL_SMTP_PASSWORD }} | |
EMAIL_SMTP_USER: ${{ secrets.EMAIL_SMTP_USER }} | |
EMAIL_TEST_USER: ${{ secrets.EMAIL_TEST_USER }} | |
steps: | |
- name: Checkout Source | |
uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: "pip" | |
- name: Start Redis | |
uses: supercharge/[email protected] | |
with: | |
redis-version: ${{ matrix.redis-version }} | |
- name: Install Dependencies | |
run: | | |
python -m pip install --upgrade pip \ | |
&& python -m pip install poetry \ | |
&& poetry config virtualenvs.create false \ | |
&& poetry install --no-root | |
- name: Run Python Tests | |
run: | | |
bash ./scripts/test-cov.sh | |
- name: Upload Coverage | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
env_vars: OS,PYTHON | |
files: ./coverage.xml | |
flags: unittests | |
name: codecov-umbrella | |
fail_ci_if_error: false | |
verbose: false |