-
Notifications
You must be signed in to change notification settings - Fork 3
97 lines (91 loc) · 2.88 KB
/
pr.yml
File metadata and controls
97 lines (91 loc) · 2.88 KB
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
93
94
95
96
97
name: Pull request
on:
pull_request:
types: [opened, edited, reopened, synchronize]
env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
PROJECT_ID: policyengine-household-api
PYTHON_VERSION: "3.12"
concurrency:
group: household-api-pr-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
check-modal-release-body:
name: Check Modal release body
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install dependencies
run: pip install -e .
- name: Check Modal release body
run: python .github/scripts/check_modal_release_body.py
check-modal-release-alembic:
name: Check Modal release Alembic compatibility
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install dependencies
run: pip install -e .
- name: Check Modal release Alembic compatibility
run: python .github/scripts/check_modal_release_alembic.py
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install Ruff
run: pip install "ruff>=0.9.0"
- name: Ruff format check
run: ruff format --check .
check-changelog:
name: Check changelog fragment
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check changelog fragment exists
run: bash .github/scripts/check-changelog-fragment.sh
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v0
with:
project_id: ${{ env.PROJECT_ID }}
service_account_key: ${{ secrets.GCP_SA_KEY }}
export_default_credentials: true
- name: Install dependencies
run: make install
- name: Run tests without auth
run: make test
- name: Run tests with auth
run: make test-with-auth
env:
AUTH__ENABLED: true
AUTH0_ADDRESS_NO_DOMAIN: ${{ secrets.AUTH0_ADDRESS_NO_DOMAIN }}
AUTH0_AUDIENCE_NO_DOMAIN: ${{ secrets.AUTH0_AUDIENCE_NO_DOMAIN }}
AUTH0_TEST_TOKEN_NO_DOMAIN: ${{ secrets.AUTH0_TEST_TOKEN_NO_DOMAIN }}
AUTH0_TEST_TOKEN_SCOPES: ${{ secrets.AUTH0_TEST_TOKEN_SCOPES }}