Skip to content

Commit

Permalink
circle config: use -node image variant, install gcloud from archive
Browse files Browse the repository at this point in the history
  • Loading branch information
snarfed committed Feb 27, 2023
1 parent 468024b commit 4836204
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions .circleci/config.yml
Expand Up @@ -7,7 +7,7 @@ version: 2.1
jobs:
build:
docker:
- image: cimg/python:3.9
- image: cimg/python:3.9-node

steps:
- checkout
Expand All @@ -22,13 +22,16 @@ jobs:
- run:
name: Base dependencies
command: |
# Node
curl -fsSL https://deb.nodesource.com/setup_current.x | sudo bash -
# google-cloud-sdk: https://cloud.google.com/sdk/docs/install#deb
echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -
# https://cloud.google.com/sdk/docs/downloads-versioned-archives
# TODO: switch back to apt-get once GCP's repo's GPG key stops 500ing
# https://packages.cloud.google.com/apt/doc/apt-key.gpg
# https://issuetracker.google.com/issues/160194366
wget https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-cli-419.0.0-linux-x86_64.tar.gz
tar xzf google-cloud-cli-419.0.0-linux-x86_64.tar.gz
./google-cloud-sdk/bin/gcloud components install beta cloud-datastore-emulator --quiet
sudo apt-get update
sudo apt-get install -y nodejs apt-transport-https ca-certificates gnupg google-cloud-sdk google-cloud-sdk-datastore-emulator default-jre
sudo apt-get install -y apt-transport-https ca-certificates default-jre
- run:
name: Python dependencies
Expand All @@ -43,13 +46,14 @@ jobs:
- run:
name: JavaScript dependencies
command: |
node --version
cd browser-extension
npm install
- run:
name: Python tests
command: |
CLOUDSDK_CORE_PROJECT=brid-gy gcloud beta emulators datastore start --no-store-on-disk --consistency=1.0 --host-port=localhost:8089 < /dev/null >& /dev/null &
CLOUDSDK_CORE_PROJECT=brid-gy ./google-cloud-sdk/bin/gcloud beta emulators datastore start --no-store-on-disk --consistency=1.0 --host-port=localhost:8089 < /dev/null >& /dev/null &
sleep 5s
python -m coverage run --source=. --omit=admin.py,appengine_config.py,logs.py,scripts/\*,tests/\* -m unittest discover -v
if [ "$TWITTER_LIVE_TEST_APP_KEY" != "" ]; then PYTHONPATH=. python tests/twitter_live_test.py --debug; fi
Expand Down

0 comments on commit 4836204

Please sign in to comment.