From 707787b3b68c5a2a33c57b8c228198a42b815482 Mon Sep 17 00:00:00 2001 From: Grzegorz Godlewski Date: Fri, 30 Aug 2024 14:29:32 +0200 Subject: [PATCH 1/3] build: support log_level input --- .github/workflows/release.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8bd30db00..bb3f4c34a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -34,6 +34,10 @@ on: description: "Provider VM version (e.g., v0.3.0)" required: false default: "v0.3.0" + log_level: + description: "The log level to force on golem-js pino-logger" + required: false + default: "info" # We're going to interact with GH from the pipelines, so we need to get some permissions permissions: @@ -45,6 +49,7 @@ env: PROVIDER_WASI_VERSION: ${{ github.event.inputs.provider_wasi_version || 'v0.2.2' }} PROVIDER_VM_VERSION: ${{ github.event.inputs.provider_vm_version || 'v0.3.0' }} PAYMENT_NETWORK: ${{ github.event.inputs.payment_network || 'holesky' }} + GOLEM_PINO_LOG_LEVEL: ${{ github.event.inputs.log_level || 'info' }} jobs: regular-checks: @@ -115,6 +120,8 @@ jobs: name: Run Examples tests needs: regular-checks runs-on: goth2 + env: + GOLEM_PINO_LOG_LEVEL: "debug" steps: - uses: actions/checkout@v4 From 5f460709f320476828ef180c315eb4eacfc008a3 Mon Sep 17 00:00:00 2001 From: Grzegorz Godlewski Date: Fri, 30 Aug 2024 19:04:53 +0200 Subject: [PATCH 2/3] build: pass GOLEM_PINO_LOG_LEVEL to docker exec for the example tests --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bb3f4c34a..8d55f0fdd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -121,7 +121,7 @@ jobs: needs: regular-checks runs-on: goth2 env: - GOLEM_PINO_LOG_LEVEL: "debug" + GOLEM_PINO_LOG_LEVEL: ${{ env.GOLEM_PINO_LOG_LEVEL }} steps: - uses: actions/checkout@v4 @@ -129,7 +129,7 @@ jobs: uses: ./.github/actions/prepare-tests - name: Run the Examples tests - run: docker exec -t docker-requestor-1 /bin/sh -c "cd /golem-js && npm run test:examples -- --exitOnError" + run: docker exec -t -e GOLEM_PINO_LOG_LEVEL="${{ env.GOLEM_PINO_LOG_LEVEL }}" docker-requestor-1 /bin/sh -c "cd /golem-js && npm run test:examples -- --exitOnError" - name: Cleanup test environment uses: ./.github/actions/cleanup-tests From d72f4c3b70fa96f25241cc2c413e9a3cf502fe99 Mon Sep 17 00:00:00 2001 From: Grzegorz Godlewski Date: Fri, 30 Aug 2024 19:08:12 +0200 Subject: [PATCH 3/3] build: pass GOLEM_PINO_LOG_LEVEL to docker exec for the example tests --- .github/workflows/release.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8d55f0fdd..a706ee586 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -120,8 +120,6 @@ jobs: name: Run Examples tests needs: regular-checks runs-on: goth2 - env: - GOLEM_PINO_LOG_LEVEL: ${{ env.GOLEM_PINO_LOG_LEVEL }} steps: - uses: actions/checkout@v4