Skip to content

Commit

Permalink
feat(uploader): add platform metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
adriencaccia committed Nov 28, 2023
1 parent cfa5f21 commit e44da76
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
3 changes: 1 addition & 2 deletions src/ci_provider/github_actions/provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,9 @@ impl CIProvider for GitHubActionsProvider {
ref_: self.ref_.clone(),

// TODO: refactor in a default implementation of the trait, as it will be the same for all providers
platform: self.get_provider_slug().into(),
runner: Runner {
name: "codspeed-runner".into(),
// TODO add back when integrating another provider
// platform: self.get_provider_slug().into(),
version: VERSION.to_string(),
},
tokenless: config.token.is_none(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@ expression: upload_metadata
"runner": {
"name": "codspeed-runner",
"version": "[version]"
}
},
"platform": "github-actions"
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@ expression: upload_metadata
"runner": {
"name": "codspeed-runner",
"version": "[version]"
}
},
"platform": "github-actions"
}
3 changes: 1 addition & 2 deletions src/uploader/interfaces.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ pub struct UploadMetadata {
pub profile_md5: String,
pub gh_data: Option<GhData>,
pub runner: Runner,
pub platform: String,
}

#[derive(Deserialize, Serialize, Debug, Clone)]
Expand All @@ -46,8 +47,6 @@ pub struct Sender {
#[serde(rename_all = "camelCase")]
pub struct Runner {
pub name: String,
// TODO add back when integrating another provider
// pub platform: String,
pub version: String,
}

Expand Down

0 comments on commit e44da76

Please sign in to comment.