Skip to content

Commit e847b82

Browse files
authored
Merge pull request #175 from argos-ci/greg/arg-219-update-docs-for-skip
Update docs for skip
2 parents 731de7c + 056dca6 commit e847b82

File tree

1 file changed

+33
-26
lines changed

1 file changed

+33
-26
lines changed

docs/guides/skip-build.mdx

Lines changed: 33 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,52 @@
11
# Skipping a Build
22

3-
In some cases, you may want to skip Argos checks for a commit or pull request.
4-
This is especially useful when Argos is configured as a **required status check** in GitHub, but screenshots are not needed (e.g. documentation-only changes, emergency hotfixes). Running Argos in these situations would be unnecessary and could even block your workflow.
3+
Sometimes you want Argos to report success without running visual tests.
4+
This is useful when Argos is configured as a required GitHub status check, but you intentionally want to skip screenshots for a commit or pull request.
55

6-
To address this, you can use the `skipped` option.
7-
When `skipped: true` is set, **no screenshots are uploaded** and the commit status is immediately marked as **success**.
6+
A skipped build:
87

9-
## When to use `skipped`
8+
- uploads no screenshots
9+
- runs no visual comparison
10+
- immediately marks the commit status as success
1011

11-
- Documentation changes with no impact on the UI
12-
- Hotfixes where visual testing is not relevant
13-
- Branches or pull requests that don’t require screenshots
14-
- Scheduled builds you want to disable selectively
12+
## Creating a skipped build
1513

16-
:::warning
14+
You can skip a build in two ways.
1715

18-
Skipping should only be used in exceptional cases. It is not meant to replace regular visual testing.
16+
### Environment variable
1917

20-
:::
18+
Set the environment variable `ARGOS_SKIPPED` to `"true"` in your CI configuration.
2119

22-
## How to enable skipping
20+
**GitHub Actions example:**
2321

24-
You can enable skipping in two ways:
22+
```yaml title=".github/workflows/ci.yml"
23+
jobs:
24+
visual-tests:
25+
runs-on: ubuntu-latest
26+
steps:
27+
- uses: actions/checkout@v6
28+
- uses: actions/setup-node@v6
29+
- name: Run tests
30+
run: npm run visual-tests # or your test command
31+
env:
32+
ARGOS_SKIPPED: "true"
33+
```
2534
26-
1. **Environment variable**
27-
Set `ARGOS_SKIPPED` to `"true"` in your CI configuration.
35+
This reports a successful Argos check without uploading screenshots.
2836
29-
2. **Configuration option**
30-
Add `skipped: true` in your Argos SDK configuration.
37+
### Using the CLI
3138
32-
## GitHub Actions example
39+
You can also explicitly create a skipped build using the CLI.
3340
34-
```yaml title="ci.yml"
41+
```yaml title=".github/workflows/ci.yml"
3542
jobs:
3643
visual-tests:
3744
runs-on: ubuntu-latest
3845
steps:
39-
- uses: actions/checkout@v4
40-
- uses: actions/setup-node@v3
41-
- name: Run tests
42-
run: npm run visual-tests # or your test command
43-
env:
44-
ARGOS_SKIPPED: "true" # Marks Argos check as "success" without uploading screenshots
46+
- uses: actions/checkout@v6
47+
- uses: actions/setup-node@v6
48+
- name: Skip Argos build
49+
run: npx @argos-ci/cli skip
4550
```
51+
52+
This immediately creates a successful Argos build with no visual testing.

0 commit comments

Comments
 (0)