12
12
- " .pylintrc"
13
13
workflow_dispatch :
14
14
env :
15
- PROJECT_ID : gcp-mira-demo
15
+ PROJECT_ID : " ${{ vars.PROJECT_ID }} "
16
16
17
17
jobs :
18
18
unit-test :
@@ -29,25 +29,23 @@ jobs:
29
29
steps :
30
30
- uses : actions/checkout@v3
31
31
32
- # https://github.com/google-github-actions/auth
33
- - id : " auth"
32
+ - id : auth
34
33
name : Auth with Service Account
35
- uses : " google-github-actions/auth@v1"
34
+ uses : google-github-actions/auth@v1
36
35
with :
37
36
credentials_json : " ${{ secrets.GCP_CREDENTIALS }}"
38
37
# FIXME: Use workload identity instead of service account key.
39
38
# workload_identity_provider: ''
40
39
# service_account: 'deployment-dev@${{ env.PROJECT_ID }}.iam.gserviceaccount.com'
41
40
42
41
- name : Set up Cloud SDK
43
- uses : " google-github-actions/setup-gcloud@v1"
42
+ uses : google-github-actions/setup-gcloud@v1
43
+ with :
44
+ install_components : gke-gcloud-auth-plugin
44
45
45
- - name : Install Firebase CLI
46
+ - name : Install Firebase CLI and emulator
46
47
run : |
47
48
curl -sL https://firebase.tools | bash
48
-
49
- - name : Download Firestore emulator
50
- run : |
51
49
firebase setup:emulators:firestore
52
50
53
51
- name : Set up Python ${{ matrix.python-version }}
@@ -58,12 +56,12 @@ jobs:
58
56
- name : Install dependencies
59
57
run : |
60
58
BASE_DIR=$(pwd)
61
- cd ${{ matrix.target-folder }}
62
59
python -m pip install --upgrade pip
63
60
python -m pip install pytest pytest-custom_exit_code pytest-cov pylint pytest-mock mock
61
+ if [ -f $BASE_DIR/common/requirements.txt ]; then pip install -r $BASE_DIR/common/requirements.txt; fi
62
+ cd ${{ matrix.target-folder }}
64
63
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
65
64
if [ -f requirements-test.txt ]; then pip install -r requirements-test.txt; fi
66
- if [ -f $BASE_DIR/common/requirements.txt ]; then pip install -r $BASE_DIR/common/requirements.txt; fi
67
65
68
66
- name : Run pytest with coverage
69
67
run : |
0 commit comments