gh_workflow/
strategy.rs

1//!
2//! Strategy types for GitHub workflow job execution.
3
4use derive_setters::Setters;
5use serde::{Deserialize, Serialize};
6use serde_json::Value;
7
8/// Represents the strategy for running jobs.
9#[derive(Debug, Setters, Serialize, Deserialize, Clone, Default, PartialEq, Eq)]
10#[serde(rename_all = "kebab-case")]
11#[setters(strip_option, into)]
12pub struct Strategy {
13    /// The matrix for job execution.
14    #[serde(skip_serializing_if = "Option::is_none")]
15    pub matrix: Option<Value>,
16
17    /// Whether to fail fast on errors.
18    #[serde(skip_serializing_if = "Option::is_none")]
19    pub fail_fast: Option<bool>,
20
21    /// The maximum number of jobs to run in parallel.
22    #[serde(skip_serializing_if = "Option::is_none")]
23    pub max_parallel: Option<u32>,
24}