> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/harness-platform/3.0/harness-platform-resources/overview/overview-1.md).

# Steps

Steps are the individual units of work inside a stage. Each step executes a specific task: running a script, building an image, deploying a service, waiting for approval, and more.

A **step** is the individual unit of work within a stage. Steps run in the order they are defined. You can group steps, run them in parallel, or loop over them using strategies.

***

## Step types

| Step           | Description                                                                              |
| -------------- | ---------------------------------------------------------------------------------------- |
| **Run**        | Executes a shell script on a delegate or remote host                                     |
| **Run test**   | Runs test scripts and captures results for test reporting                                |
| **Background** | Runs a service in the background for other steps to use (e.g. a database or mock server) |
| **Action**     | Runs a GitHub Action within your pipeline                                                |
| **Approval**   | Pauses execution and waits for a user to approve before continuing                       |
| **Queue**      | Controls concurrency by queuing pipeline executions                                      |
| **Barrier**    | Synchronization point that holds parallel stages or steps until all reach the barrier    |
| **Group**      | Organizes steps that run sequentially inside a named container                           |
| **Parallel**   | Runs multiple steps simultaneously                                                       |

***

## Advanced settings

Every step exposes an **Advanced** section with the following settings. These work the same way as their stage-level equivalents.

### Timeout

Maximum time a step is allowed to run before Harness terminates it. Default is `2h`.

```yaml
steps:
  - name: build
    id: build
    timeout: 10m
    run:
      script: make build
```

### On failure

Defines what Harness does if the step fails. Same list format and action options as stage-level on failure.

```yaml
steps:
  - name: deploy
    id: deploy
    on-failure:
      - errors:
          - all
        action: ignore
    run:
      script: ./deploy.sh
```

### Strategy

Loops the step multiple times using a for loop, while loop, or matrix. Same syntax as stage-level strategy.

```yaml
steps:
  - name: test
    id: test
    strategy:
      matrix:
        env:
          - staging
          - production
    run:
      script: ./test.sh ${{ matrix.env }}
```

### Conditional execution

Skips the step based on a JEXL condition evaluated at runtime.

```yaml
steps:
  - name: notify
    id: notify
    if: <+OnPipelineSuccess>
    run:
      script: ./notify.sh
```

***

## Next steps

* Go to [Group](/harness-platform/3.0/harness-platform-resources/overview/overview-1/group.md) to organize steps sequentially.
* Go to [Parallel](/harness-platform/3.0/harness-platform-resources/overview/overview-1/parallel.md) to run steps simultaneously.
* Go to [Strategy](/harness-platform/3.0/harness-platform-resources/overview/strategy.md) to loop a step across values.
* Go to [On failure](/harness-platform/3.0/harness-platform-resources/overview/strategy/on-failure.md) to handle step-level failures.
* Go to [Conditional execution](/harness-platform/3.0/harness-platform-resources/overview/strategy/conditional-execution.md) to skip steps conditionally.
