Bump miniflare and wrangler #491
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: STeLLAR Test Pipeline | |
on: [ push, pull_request ] | |
jobs: | |
check_syntax: | |
name: Check syntax | |
runs-on: ubuntu-22.04 | |
env: | |
working-directory: ./src | |
steps: | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v4 | |
- name: Check syntax | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
working-directory: ${{ env.working-directory }} | |
args: --timeout 5m --skip-dirs raw-code | |
skip-pkg-cache: true | |
skip-build-cache: true | |
build_client: | |
name: Build framework | |
runs-on: ubuntu-22.04 | |
env: | |
working-directory: ./src | |
steps: | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v4 | |
- name: Build client binary | |
working-directory: ${{ env.working-directory }} | |
run: | | |
docker build -t stellar . | |
docker create --name temp stellar /bin/bash | |
- name: Package client artifact | |
run: | | |
mkdir -p "setup/deployment/raw-code" | |
docker cp temp:/app/stellar ./main | |
docker cp temp:/app/setup/deployment/raw-code/functions setup/deployment/raw-code/functions | |
tar -czvf build.tar ./main ./setup/deployment/raw-code/functions | |
- name: Upload client artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: STeLLAR-build | |
path: build.tar | |
retention-days: 1 | |
unit_tests: | |
name: Unit tests | |
strategy: | |
matrix: | |
path: | |
[ | |
./setup/test/..., | |
./benchmarking/..., | |
./util/..., | |
./setup/building/test/..., | |
./setup/code-generation/test/..., | |
./setup/deployment/packaging/test/..., | |
] | |
needs: [ build_client ] | |
runs-on: ubuntu-22.04 | |
env: | |
working-directory: ./src | |
DOCKER_HUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }} | |
DOCKER_HUB_ACCESS_TOKEN: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | |
steps: | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v4 | |
- name: Configure AWS credentials using EASE lab account | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_KEY }} | |
aws-region: us-west-1 | |
- id: auth | |
name: Configure GCR credentials | |
uses: google-github-actions/auth@v1 | |
with: | |
credentials_json: ${{ secrets.GCR_CREDENTIALS }} | |
- name: Set up gcloud | |
uses: google-github-actions/setup-gcloud@v1 | |
with: | |
version: ">= 363.0.0" | |
- name: Download client artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: STeLLAR-build | |
- name: Untar client build | |
working-directory: ${{ env.working-directory }} | |
run: tar --strip-components=1 -xvf ../build.tar -C . | |
- name: Unit tests | |
working-directory: ${{ env.working-directory }} | |
run: go test -short -v ${{ matrix.path }} | |
integration_tests: | |
name: Integration tests | |
needs: [ build_client ] | |
runs-on: ubuntu-22.04 | |
env: | |
working-directory: ./src | |
DOCKER_HUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }} | |
DOCKER_HUB_ACCESS_TOKEN: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | |
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }} | |
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} | |
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} | |
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} | |
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
steps: | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v4 | |
- name: Configure AWS credentials using EASE lab account | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_KEY }} | |
aws-region: us-west-1 | |
- id: auth | |
name: Configure GCR credentials | |
uses: google-github-actions/auth@v1 | |
with: | |
credentials_json: ${{ secrets.GCR_CREDENTIALS }} | |
- name: Set up gcloud | |
uses: google-github-actions/setup-gcloud@v1 | |
with: | |
version: ">= 363.0.0" | |
- name: Set up Alibaba Cloud credentials | |
run: | | |
mkdir $HOME/.aliyuncli | |
echo "[default]" > $HOME/.aliyuncli/credentials | |
echo "aliyun_access_key_secret = $ALIYUN_ACCESS_KEY_SECRET" >> $HOME/.aliyuncli/credentials | |
echo "aliyun_access_key_id = $ALIYUN_ACCESS_KEY_ID" >> $HOME/.aliyuncli/credentials | |
echo "aliyun_account_id = $ALIYUN_ACCOUNT_ID" >> $HOME/.aliyuncli/credentials | |
echo "" >> $HOME/.aliyuncli/credentials | |
env: | |
ALIYUN_ACCESS_KEY_SECRET: ${{ secrets.ALIYUN_ACCESS_KEY_SECRET }} | |
ALIYUN_ACCESS_KEY_ID: ${{ secrets.ALIYUN_ACCESS_KEY_ID }} | |
ALIYUN_ACCOUNT_ID: ${{ secrets.ALIYUN_ACCOUNT_ID }} | |
- name: Set up Node.js 16.16.0 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16.16.0 | |
- name: Install Serverless framework and related plugins | |
# functions-have-names appears to be a dependency of serverless-azure-functions | |
run: npm install -g serverless serverless-azure-functions functions-have-names serverless-aliyun-function-compute | |
- name: Install Cloudflare Wrangler | |
run: npm install -g wrangler | |
- name: Download client artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: STeLLAR-build | |
- name: Untar client build | |
working-directory: ${{ env.working-directory }} | |
run: tar --strip-components=1 -xvf ../build.tar -C . | |
- name: Prepare benchmarking functions | |
run: | | |
mkdir -p "setup/deployment/raw-code" | |
cp -R ./src/setup/deployment/raw-code/functions setup/deployment/raw-code/functions | |
mkdir -p "./src/latency-samples" | |
- name: Integration Tests | |
working-directory: ${{ env.working-directory }} | |
run: go test -short -v ./setup/integration-test/... -timeout 30m | |
e2e_azure: | |
name: Azure e2e test | |
needs: [ build_client, integration_tests ] | |
runs-on: ubuntu-22.04 | |
env: | |
working-directory: ./src | |
steps: | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v4 | |
- name: Set up Node.js 16.16.0 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16.16.0 | |
- name: Install Serverless framework and related plugins | |
# functions-have-names appears to be a dependency of serverless-azure-functions | |
run: npm install -g serverless serverless-azure-functions functions-have-names | |
- name: Download client artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: STeLLAR-build | |
- name: Untar client build | |
working-directory: ${{ env.working-directory }} | |
run: tar --strip-components=1 -xvf ../build.tar -C . | |
- name: Prepare benchmarking functions | |
run: | | |
mkdir -p "setup/deployment/raw-code" | |
cp -R ./src/setup/deployment/raw-code/functions setup/deployment/raw-code/functions | |
mkdir -p "./src/latency-samples" | |
- name: Azure end-to-end test for Python | |
working-directory: ${{ env.working-directory }} | |
run: ./main --o latency-samples --c ../experiments/tests/azure/hellopy.json --s true | |
env: | |
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }} | |
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} | |
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} | |
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} | |
e2e_aws: | |
name: AWS e2e test | |
needs: [ build_client, integration_tests ] | |
runs-on: ubuntu-22.04 | |
env: | |
working-directory: ./src | |
steps: | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v4 | |
- name: Configure AWS credentials using EASE lab account | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_KEY }} | |
aws-region: us-west-1 | |
- name: Set up Node.js 16.16.0 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16.16.0 | |
- name: Install serverless framework | |
run: npm install -g serverless | |
- name: Download client artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: STeLLAR-build | |
- name: Untar client build | |
working-directory: ${{ env.working-directory }} | |
run: tar --strip-components=1 -xvf ../build.tar -C . | |
- name: Prepare benchmarking functions | |
run: | | |
mkdir -p "setup/deployment/raw-code" | |
cp -R ./src/setup/deployment/raw-code/functions setup/deployment/raw-code/functions | |
mkdir -p "./src/latency-samples" | |
- name: AWS end-to-end test for Go | |
working-directory: ${{ env.working-directory }} | |
run: ./main --o latency-samples --c ../experiments/tests/aws/hellogo.json --s true | |
e2e_gcr: | |
name: GCR e2e test | |
needs: [ build_client, integration_tests ] | |
runs-on: ubuntu-22.04 | |
env: | |
working-directory: ./src | |
DOCKER_HUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }} | |
DOCKER_HUB_ACCESS_TOKEN: ${{secrets.DOCKER_HUB_ACCESS_TOKEN}} | |
steps: | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v4 | |
- id: auth | |
name: Configure GCR credentials | |
uses: google-github-actions/auth@v1 | |
with: | |
credentials_json: ${{ secrets.GCR_CREDENTIALS }} | |
- name: Set up gcloud | |
uses: google-github-actions/setup-gcloud@v1 | |
with: | |
version: ">= 363.0.0" | |
- name: Set up Node.js 16.16.0 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16.16.0 | |
- name: Download client artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: STeLLAR-build | |
- name: Untar client build | |
working-directory: ${{ env.working-directory }} | |
run: tar --strip-components=1 -xvf ../build.tar -C . | |
- name: Prepare benchmarking functions | |
run: | | |
mkdir -p 'setup/deployment/raw-code' | |
cp -R ./src/setup/deployment/raw-code/functions setup/deployment/raw-code/functions | |
mkdir -p './src/latency-samples' | |
- name: GCR end-to-end test for Python | |
working-directory: ${{ env.working-directory }} | |
run: ./main --o latency-samples --c ../experiments/tests/gcr/hellopy.json --s true | |
- name: GCR end-to-end test for Go | |
working-directory: ${{ env.working-directory }} | |
run: ./main --o latency-samples --c ../experiments/tests/gcr/hellogo.json --s true | |
- name: GCR end-to-end test for Java | |
working-directory: ${{ env.working-directory }} | |
run: ./main --o latency-samples --c ../experiments/tests/gcr/hellogo.json --s true | |
e2e_cloudflare: | |
name: Cloudflare e2e test | |
needs: [ build_client, integration_tests ] | |
runs-on: ubuntu-22.04 | |
env: | |
working-directory: ./src | |
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
steps: | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v4 | |
- name: Set up Node.js 16.16.0 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16.16.0 | |
- name: Install Cloudflare Wrangler | |
run: npm install -g wrangler | |
- name: Download client artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: STeLLAR-build | |
- name: Untar client build | |
working-directory: ${{ env.working-directory }} | |
run: tar --strip-components=1 -xvf ../build.tar -C . | |
- name: Prepare benchmarking functions | |
run: | | |
mkdir -p 'setup/deployment/raw-code' | |
cp -R ./src/setup/deployment/raw-code/functions setup/deployment/raw-code/functions | |
mkdir -p './src/latency-samples' | |
- name: Cloudflare end-to-end test for Python | |
working-directory: ${{ env.working-directory }} | |
run: ./main --o latency-samples --c ../experiments/tests/cloudflare/hellopy.json --s true |