-
Notifications
You must be signed in to change notification settings - Fork 4
59 lines (47 loc) · 1.86 KB
/
main-pytest.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
name: PyTest Workflow
on:
push:
branches:
- 'main'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4 # https://github.com/actions/checkout
- name: Set up Python 3.12
uses: actions/setup-python@v5 # https://github.com/actions/setup-python
with:
python-version: "3.12"
- name: Install pytest
run: |
pip install pytest pytest-cov pytest-asyncio
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Set PYTHONPATH
run: echo "PYTHONPATH=$GITHUB_WORKSPACE" >> $GITHUB_ENV
- name: Run pytest
env:
GH_APP_ID: ${{ secrets.PROD_GH_APP_ID }}
GH_APP_NAME: ${{ secrets.GH_APP_NAME }}
GH_APP_USER_ID: ${{ secrets.GH_APP_USER_ID }}
GH_APP_USER_NAME: ${{ secrets.GH_APP_USER_NAME }}
GH_PRIVATE_KEY: ${{ secrets.PROD_GH_PRIVATE_KEY }}
GH_WEBHOOK_SECRET: ${{ secrets.PROD_GH_WEBHOOK_SECRET }}
OPENAI_API_KEY: ${{ secrets.PROD_OPENAI_API_KEY }}
OPENAI_ORG_ID: ${{ secrets.PROD_OPENAI_ORG_ID }}
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
SUPABASE_SERVICE_ROLE_KEY: ${{ secrets.PROD_SUPABASE_SERVICE_ROLE_KEY }}
SUPABASE_URL: ${{ secrets.PROD_SUPABASE_URL }}
STRIPE_API_KEY: ${{ secrets.PROD_STRIPE_API_KEY }}
STRIPE_FREE_TIER_PRICE_ID: ${{ secrets.PROD_STRIPE_FREE_TIER_PRICE_ID }}
STRIPE_PRODUCT_ID_FREE: ${{ secrets.STRIPE_PRODUCT_ID_FREE_PROD }}
STRIPE_PRODUCT_ID_STANDARD: ${{ secrets.STRIPE_PRODUCT_ID_STANDARD_PROD }}
ENV: prod
PRODUCT_ID: ${{ secrets.PROD_PRODUCT_ID }}
run: python -m pytest -r fE
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5.1.2
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
flags: unittests
name: codecov-umbrella