Run Performance test #8
Workflow file for this run
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: Run Performance test | |
on: | |
workflow_dispatch: # manually triggered | |
inputs: | |
test_name: | |
type: string | |
description: Folder name containing the performance test yaml | |
required: true | |
js_ceramic_image: | |
type: string | |
description: Image for js-ceramic | |
required: true | |
default: ceramicnetwork/js-ceramic:latest | |
rust_ceramic_image: | |
type: string | |
description: Image for rust-ceramic | |
required: true | |
default: public.ecr.aws/r5b3e0r5/3box/ceramic-one:latest | |
scenario_image: | |
type: string | |
description: Image for scenario | |
required: true | |
default: public.ecr.aws/r5b3e0r5/3box/keramik-runner:latest | |
env: | |
CARGO_TERM_COLOR: always | |
SCCACHE_GHA_ENABLED: "true" | |
RUSTC_WRAPPER: "sccache" | |
jobs: | |
template-network: | |
name: Template Network | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install yq | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y software-properties-common | |
sudo add-apt-repository -y ppa:rmescandon/yq | |
sudo apt-get update | |
sudo apt-get install -y yq | |
- name: Template network | |
run: | | |
set -exo pipefail | |
export RUST_CERAMIC_IMAGE=${{ inputs.rust_ceramic_image }} | |
export SCENARIO_IMAGE=${{ inputs.scenario_image }} | |
export JS_CERAMIC_IMAGE=${{ inputs.js_ceramic_image }} | |
export TEST_NAME=${{ inputs.test_name }} | |
ls -l performance/$TEST_NAME | |
export THIS_TEST=${{ inputs.test_name }}-${{ github.run_id }} | |
mkdir -p performance/$THIS_TEST | |
# set the network name yaml key to the test names | |
yq e '.metadata.name = env(THIS_TEST)' performance/$TEST_NAME/network.yaml \ | |
> performance/$THIS_TEST/network.yaml | |
cat performance/$THIS_TEST/network.yaml | |
echo "THIS_TEST=$THIS_TEST" >> $GITHUB_ENV | |
deploy-network: | |
name: Deploy Network | |
runs-on: ubuntu-latest | |
environment: cas-scaling-2024 | |
needs: template-network | |
steps: | |
- name: Setup GKE auth | |
uses: 'google-github-actions/auth@v1' | |
with: | |
credentials_json: ${{ secrets.GKE_SA_KEY }} | |
- name: Get GKE credentials | |
uses: 'google-github-actions/get-gke-credentials@v1' | |
with: | |
cluster_name: ${{ vars.GKE_CLUSTER }} | |
location: ${{ vars.GKE_ZONE }} | |
- name: show network | |
run: | | |
cat performance/${{ env.THIS_TEST }}/network.yaml |