Skip to content

Commit 4a041d3

Browse files
authored
Merge pull request #167 from argos-ci/document-skip-build
document skip build
2 parents 34d8e57 + 4c3a69c commit 4a041d3

File tree

3 files changed

+47
-4
lines changed

3 files changed

+47
-4
lines changed

docs/guides/skip-build.mdx

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Skipping a Build
2+
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.
5+
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**.
8+
9+
## When to use `skipped`
10+
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
15+
16+
:::warning
17+
18+
Skipping should only be used in exceptional cases. It is not meant to replace regular visual testing.
19+
20+
:::
21+
22+
## How to enable skipping
23+
24+
You can enable skipping in two ways:
25+
26+
1. **Environment variable**
27+
Set `ARGOS_SKIPPED` to `"true"` in your CI configuration.
28+
29+
2. **Configuration option**
30+
Add `skipped: true` in your Argos SDK configuration.
31+
32+
## GitHub Actions example
33+
34+
```yaml title="ci.yml"
35+
jobs:
36+
visual-tests:
37+
runs-on: ubuntu-latest
38+
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
45+
```

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "0.0.0",
44
"private": true,
55
"scripts": {
6+
"dev": "docusaurus start",
67
"start": "docusaurus start",
78
"build": "rm -rf external && npm run sync-external && docusaurus build",
89
"swizzle": "docusaurus swizzle",

src/css/custom.css

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,15 +199,12 @@ div .alert > div:first-child {
199199
display: none;
200200
}
201201

202-
.alert.alert--info {
203-
}
204-
205202
.alert.alert--warning {
206203
@apply border-amber-8 text-sm text-amber-12 bg-amber-1;
207204

208205
&::before {
209206
content: "⚠";
210-
@apply text-xl mr-3 text-amber-11;
207+
@apply text-xl leading-5 mr-3 text-amber-11;
211208
}
212209

213210
a {

0 commit comments

Comments
 (0)