From e3b24d68d9c041a1533616dedfa1858c42fa3fbb Mon Sep 17 00:00:00 2001 From: Spencer Clark Date: Thu, 21 Sep 2023 14:21:35 +0000 Subject: [PATCH] Add CI workflow --- .circleci/config.yml | 28 ++++++++++++++++++++++++++++ Makefile | 3 +++ 2 files changed, 31 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..e3dc100 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,28 @@ +version: 2.1 +orbs: + gcp-gcr: circleci/gcp-gcr@0.15.0 + gh: circleci/github-cli@2.1.0 +jobs: + build: + machine: + image: ubuntu-2004:202111-02 + environment: + FSSPEC_GS_REQUESTER_PAYS: vcm-ml + GOOGLE_APPLICATION_CREDENTIALS: /tmp/key.json + steps: + - checkout + - run: make update_submodules + - run: + name: "gcloud auth" + command: | + echo $ENCODED_GOOGLE_CREDENTIALS | base64 -d > $GOOGLE_APPLICATION_CREDENTIALS + echo "export GCLOUD_SERVICE_KEY=\$(echo \$ENCODED_GOOGLE_CREDENTIALS | base64 --decode)" >> $BASH_ENV + - gcp-gcr/gcr-auth + - run: make build + - run: make test + +workflows: + version: 2 + build: + jobs: + - build diff --git a/Makefile b/Makefile index fba4c57..1b34a2a 100644 --- a/Makefile +++ b/Makefile @@ -20,3 +20,6 @@ enter: lock_pip: pip-compile requirements.in + +update_submodules: + git submodule update --init --recursive