Skip to content

Commit 20ec310

Browse files
committed
Update github actions
Add datastore emulator into github action pipeline.
1 parent 7e20834 commit 20ec310

1 file changed

Lines changed: 18 additions & 1 deletion

File tree

.github/workflows/python-self-hosted.yaml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,28 @@ jobs:
1919
uses: actions/setup-python@v5
2020
with:
2121
python-version: '3.13'
22+
23+
- name: Install datastore emulator
24+
run: |
25+
if ! command -v gcloud &> /dev/null; then
26+
echo "Installing Google Cloud SDK..."
27+
curl -O https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-cli-linux-x86_64.tar.gz
28+
tar -xf google-cloud-cli-linux-x86_64.tar.gz
29+
yes | ./google-cloud-sdk/install.sh
30+
yes | gcloud beta emulators datastore env-init
31+
else
32+
echo "gcloud already installed"
33+
fi
34+
gcloud version
2235
2336
- name: Install dependencies
2437
run: |
2538
python -m pip install --upgrade pip
26-
pip install -r requirements.txt
39+
if [ -f requirements.txt ]; then
40+
pip install -r requirements.txt
41+
else
42+
echo "No requirements.txt found"
43+
fi
2744
2845
- name: Run tests
2946
run: |

0 commit comments

Comments
 (0)