-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Expand file tree
/
Copy pathdjango-spanner-foreign_keys.yaml
More file actions
64 lines (58 loc) · 1.87 KB
/
Copy pathdjango-spanner-foreign_keys.yaml
File metadata and controls
64 lines (58 loc) · 1.87 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
permissions:
contents: read
on:
pull_request:
paths:
- 'packages/django-google-spanner/**'
- '.github/workflows/django-spanner-foreign_keys.yaml'
push:
branches:
- main
paths:
- 'packages/django-google-spanner/**'
- '.github/workflows/django-spanner-foreign_keys.yaml'
defaults:
run:
working-directory: packages/django-google-spanner
name: foreign-keys-test
jobs:
check_changes:
runs-on: ubuntu-latest
outputs:
run_django_spanner: ${{ steps.filter.outputs.django_spanner }}
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
with:
persist-credentials: false
- uses: dorny/paths-filter@7b450fff21473bca461d4b92ce414b9d0420d706 # v4
id: filter
with:
filters: |
django_spanner:
- 'packages/django-google-spanner/**'
- '.github/workflows/django-spanner-foreign_keys.yaml'
system-tests:
needs: check_changes
if: ${{ needs.check_changes.outputs.run_django_spanner == 'true' }}
runs-on: ubuntu-latest
services:
emulator-0:
image: gcr.io/cloud-spanner-emulator/emulator:latest # zizmor: ignore[unpinned-images]
ports:
- 9010:9010
steps:
- name: Checkout code
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
with:
persist-credentials: false
- name: Setup Python
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
with:
python-version: "3.14"
- name: Run Django foreign key test
run: sh foreign_key_test.sh
env:
SPANNER_EMULATOR_HOST: localhost:9010
GOOGLE_CLOUD_PROJECT: emulator-test-project
GOOGLE_CLOUD_TESTS_CREATE_SPANNER_INSTANCE: true
SPANNER_TEST_INSTANCE: google-cloud-django-backend-tests