From ebaabfe6d6b72dd42acbde6f5a74c46bee63416f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Bajto=C5=A1?= Date: Thu, 18 Apr 2024 11:11:35 +0200 Subject: [PATCH] Feat: Get station_id from Zinnia env and add to measurements submission (#60) * Get station_id from Zinnia env and add to measurements submission * Bump Zinnia version for GH workflow --------- Co-authored-by: Patrick Nercessian --- .github/workflows/ci.yml | 2 +- lib/spark.js | 3 ++- test/spark.js | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 96f1094..13aab7b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,7 +5,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - run: curl -L https://github.com/filecoin-station/zinnia/releases/download/v0.16.0/zinnia-linux-x64.tar.gz | tar -xz + - run: curl -L https://github.com/filecoin-station/zinnia/releases/download/v0.18.1/zinnia-linux-x64.tar.gz | tar -xz - uses: actions/setup-node@v3 - run: npx standard - run: ./zinnia run test.js diff --git a/lib/spark.js b/lib/spark.js index 1b7adc6..f731832 100644 --- a/lib/spark.js +++ b/lib/spark.js @@ -170,7 +170,8 @@ export default class Spark { zinniaVersion: Zinnia.versions.zinnia, ...task, ...stats, - participantAddress: Zinnia.walletAddress + participantAddress: Zinnia.walletAddress, + stationId: Zinnia.stationId } console.log('%o', payload) const res = await this.#fetch('https://api.filspark.com/measurements', { diff --git a/test/spark.js b/test/spark.js index 2ff5224..87e1476 100644 --- a/test/spark.js +++ b/test/spark.js @@ -131,7 +131,8 @@ test('submitRetrieval', async () => { sparkVersion: SPARK_VERSION, zinniaVersion: Zinnia.versions.zinnia, cid: 'bafytest', - participantAddress: Zinnia.walletAddress + participantAddress: Zinnia.walletAddress, + stationId: Zinnia.stationId }), headers: { 'Content-Type': 'application/json' } }