-
Notifications
You must be signed in to change notification settings - Fork 0
92 lines (89 loc) · 3.91 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
name: CI
on:
push:
branches: [ "prod" ]
pull_request:
branches: [ "prod" ]
workflow_dispatch:
jobs:
test:
runs-on: ${{ matrix.os }}
environment: GCAPI-Backend
strategy:
fail-fast: true
matrix:
os: ["ubuntu-latest"]
python-version: ["3.11"]
redis-version: ["7"]
env:
API_MODE: "test"
ENVIRONMENT: "pytest"
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 }}
WORKER_SENTRY_DSN: ${{ secrets.WORKER_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