Skip to content

Commit

Permalink
Feat: Get station_id from Zinnia env and add to measurements submissi…
Browse files Browse the repository at this point in the history
…on (#60)

* Get station_id from Zinnia env and add to measurements submission

* Bump Zinnia version for GH workflow

---------

Co-authored-by: Patrick Nercessian <[email protected]>
  • Loading branch information
bajtos and PatrickNercessian authored Apr 18, 2024
1 parent e784051 commit ebaabfe
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 2 additions & 1 deletion lib/spark.js
Original file line number Diff line number Diff line change
Expand Up @@ -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', {
Expand Down
3 changes: 2 additions & 1 deletion test/spark.js
Original file line number Diff line number Diff line change
Expand Up @@ -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' }
}
Expand Down

0 comments on commit ebaabfe

Please sign in to comment.