Skip to content

chore(release): cut atala prism 1.9.2 release #485

chore(release): cut atala prism 1.9.2 release

chore(release): cut atala prism 1.9.2 release #485

name: Performance tests
concurrency:
group: ${{ github.head_ref }}${{ github.ref }}-performance-tests
cancel-in-progress: true
on:
pull_request:
paths:
- ".github/workflows/performance-tests.yml"
- "tests/performance-tests/**"
push:
branches:
- "main"
workflow_dispatch:
env:
BENCHMARKING_DIR: "tests/performance-tests/atala-performance-tests-k6"
NODE_AUTH_TOKEN: ${{ secrets.ATALA_GITHUB_TOKEN }}
jobs:
run-e2e-tests:
name: "Run performance tests"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Java and Scala
uses: olafurpg/setup-scala@v13
with:
java-version: [email protected]
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ secrets.ATALA_GITHUB_ACTOR }}
password: ${{ secrets.ATALA_GITHUB_TOKEN }}
- name: Install Compose
uses: ndeloof/[email protected]
with:
version: v2.12.2
legacy: true # will also install in PATH as `docker-compose`
- name: Build local version of PRISM Agent
env:
ENV_FILE: "infrastructure/local/.env"
GITHUB_ACTOR: ${{ secrets.ATALA_GITHUB_ACTOR }}
GITHUB_TOKEN: ${{ secrets.ATALA_GITHUB_TOKEN }}
run: |
sbt docker:publishLocal
PRISM_AGENT_VERSION=$(cut version.sbt -d '=' -f2 | tr -d '" ')
sed -i.bak "s/PRISM_AGENT_VERSION=.*/PRISM_AGENT_VERSION=${PRISM_AGENT_VERSION}/" "${ENV_FILE}" && rm -f "${ENV_FILE}.bak"
cat "${ENV_FILE}"
- name: Start services for issuer
env:
PORT: 8080
uses: isbang/[email protected]
with:
compose-file: "./infrastructure/shared/docker-compose.yml"
compose-flags: "--env-file ./infrastructure/local/.env -p issuer"
up-flags: "--wait"
down-flags: "--volumes"
- name: Start services for holder
env:
PORT: 8090
uses: isbang/[email protected]
with:
compose-file: "./infrastructure/shared/docker-compose.yml"
compose-flags: "--env-file ./infrastructure/local/.env -p holder"
up-flags: "--wait"
down-flags: "--volumes"
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16.x
registry-url: "https://npm.pkg.github.com"
- name: Install dependencies
uses: borales/actions-yarn@v4
with:
cmd: install
dir: ${{ env.BENCHMARKING_DIR }}
- name: Compile tests to JS
uses: borales/actions-yarn@v4
with:
cmd: webpack
dir: ${{ env.BENCHMARKING_DIR }}
- name: Connection Flow Smoke Test
run: |
# Have to use manual download because GitHub action doesnt support localhost execution
curl https://github.com/grafana/k6/releases/download/v0.45.0/k6-v0.45.0-linux-amd64.tar.gz -L | tar xvz --strip-components 1
ls -la
./k6 run ${{ env.BENCHMARKING_DIR }}/dist/connection-flow-test.js