-
Notifications
You must be signed in to change notification settings - Fork 2
63 lines (60 loc) · 2.03 KB
/
Copy pathcheck.python.yml
File metadata and controls
63 lines (60 loc) · 2.03 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
# Python test gate. Until this workflow, the pytest suites only ran via
# local `make test-*` convention - nothing gated PRs. The postgres
# service backs the real-Postgres store tests (test_pg_stores.py, #354):
# their semantics (ON CONFLICT atomicity, jsonb merge, concurrent
# claims) are exactly what fakes get wrong, so no sqlite stand-in.
name: check.python
on:
pull_request:
paths:
- 'services/**'
- 'scripts/**'
- 'Makefile'
- '.github/workflows/check.python.yml'
push:
branches: [main]
paths:
- 'services/**'
- 'scripts/**'
permissions:
contents: read
jobs:
tests:
runs-on: ubuntu-latest
timeout-minutes: 15
services:
postgres:
image: postgres:18-alpine
env:
POSTGRES_PASSWORD: test
POSTGRES_DB: grug_test
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U postgres"
--health-interval 5s
--health-timeout 3s
--health-retries 10
env:
# Post-#354 swap: the store IS Postgres, so the route/store tests
# in BOTH suites use the service container (job-level env; the
# suites carry psycopg now). The dedicated pg-test step keeps the
# skip-guard lane.
GRUG_TEST_DATABASE_URL: postgresql://postgres:test@localhost:5432/grug_test
# moto-backed suites construct boto3 clients at import; hosted
# runners have no ambient AWS config (developer shells do, which
# is why this never bit locally).
AWS_DEFAULT_REGION: us-east-1
AWS_ACCESS_KEY_ID: testing
AWS_SECRET_ACCESS_KEY: testing
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8
- name: webhook tests
run: make webhook-test
- name: scripts tests (promotion decision + migration)
run: make scripts-test
- name: api tests
run: make api-test
- name: pg store tests (real Postgres)
run: make pg-test