From 56682a44aa7424a9b21bbde1aedb791a123f0dbf Mon Sep 17 00:00:00 2001 From: Lim Chee Kin Date: Tue, 23 May 2023 21:24:41 +0800 Subject: [PATCH] chore: update circleci config to use LinuxVM --- .circleci/config.yml | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index bccd7ae..3d691c7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,34 +3,24 @@ version: 2.1 workflows: deploy-dev: jobs: - - deploy-dev + - deploy-dev: + filters: + branches: + only: + - fastchat-t5-3b-ct2 jobs: deploy-dev: + machine: true resource_class: large - windows: true steps: - - setup_remote_docker: - version: 20.10.8 - docker_layer_caching: true - - run: - name: Test docker setup - command: | - set -x - docker version - docker run --rm hello-world - checkout - - run: - name: Install NodeJS 18 - command: | - choco install nodejs-lts -y - node --version - run: name: Install Serverless Framework command: npm install -g serverless - run: name: Serverless AWS authentication - command: sls config credentials --provider aws --key %AWS_KEY% --secret %AWS_SECRET% + command: sls config credentials --provider aws --key $AWS_KEY --secret $AWS_SECRET environment: AWS_KEY: ${{ secrets.AWS_KEY }} AWS_SECRET: ${{ secrets.AWS_SECRET }} @@ -45,16 +35,16 @@ jobs: command: | pwd cd $CIRCLE_BRANCH - sls info --verbose | grep endpoint | sed s/endpoint\:\ //g | awk '{print $1}' > endpoint + sls info --verbose | grep endpoint | sed 's/endpoint\:\ //g' | awk '{print $1}' > endpoint - run: name: Echo Endpoint URL command: | pwd cd $CIRCLE_BRANCH - type endpoint + cat endpoint - run: name: Test Lambda functions command: | pwd cd $CIRCLE_BRANCH - curl -X POST -H 'Content-Type: application/json' -d @prompt.json $(type endpoint) + curl -X POST -H 'Content-Type: application/json' -d @prompt.json $(cat endpoint)