Skip to content

Commit 34d8e57

Browse files
authored
Merge pull request #166 from argos-ci/update-ci-mode
update ci mode
2 parents a02320b + f9ad069 commit 34d8e57

File tree

2 files changed

+40
-34
lines changed

2 files changed

+40
-34
lines changed

docs/guides/monitoring-mode.mdx

Lines changed: 36 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -9,50 +9,57 @@ import { RunPkgCommand } from "@site/src/partials";
99

1010
Argos provides two build modes for visual testing: **Continuous Integration (CI) mode** and **Monitoring mode**. This page explains how each mode works, their key differences, and when to use them to best fit your workflow.
1111

12-
## Continous Integration Mode
12+
## Continuous Integration Mode
1313

14-
The Continuous Integration (CI) mode is the default mode in Argos, designed to prevent visual regressions by integrating visual testing into your CI pipeline. In CI mode, Argos typically runs on each pull request and on the default branch of your repository.
14+
Continuous Integration (CI) mode is the default in Argos. It is designed to review the visual changes introduced by a feature branch and prevent regressions.
1515

16-
In this mode, screenshots from your pull request branch are compared with screenshots from a [baseline build](/baseline-build) determined by Git history analysis and [other criterias](/baseline-build).
16+
During your CI pipeline, screenshots of the application are captured on each pull request and on the default branch (main, production, etc.). These screenshots are uploaded to Argos, where they are compared against a [baseline build](/baseline-build).
17+
18+
The [baseline build](/baseline-build) represents the most recent approved state of your application and is automatically selected based on Git history analysis and [other criteria](/baseline-build).
19+
20+
In the Argos app, you can review highlighted differences, approve intended updates, and block regressions before merging.
21+
22+
**Note:** Your CI pipeline must also run on the default branch (main, production, etc.) to keep the baseline build up to date.
1723

1824
### Workflow
1925

2026
1. **Feature Development**
2127

22-
- A developer commits code to a feature or bugfix branch.
23-
- Optionally, a pull request (PR) is opened for review.
28+
- A developer creates a feature (or bugfix) branch and commits changes.
29+
- Optionally, a pull request (PR) is opened.
2430

25-
2. **Visual Tests on the Feature Branch**
31+
2. **Visual Tests in CI**
2632

27-
- Argos integrates with your test framework [via SDKs](/getting-started).
28-
- During CI, your test framework runs visual tests.
29-
- Screenshots are captured and uploaded to Argos.
33+
- During these tests, your test framework (Playwright, Cypress, etc.) captures screenshots of the app. Argos offers [SDKs](/getting-started) for easy integration with popular frameworks.
34+
- At the end of the tests, screenshots are uploaded to Argos automatically with the SDK, or manually using the Argos CLI.
3035

31-
3. **Baseline Comparison**
36+
3. **Comparison with Baseline**
3237

33-
- Argos determines the [baseline build](/baseline-build) from Git history and other criteria.
34-
- New screenshots are compared against the baseline.
38+
- Argos receives the build containing screenshots and metadata.
39+
- It automatically determines the [baseline build](/baseline-build) using Git history analysis and other criteria.
40+
- The new screenshots are compared against the baseline.
3541

3642
4. **Results & Notifications**
3743

38-
- When the build completes:
39-
- ✅ No differences → commit status set to _success_.
40-
- ❌ Differences found → commit status set to _failed_, with diffs visible in the Argos dashboard.
41-
- On GitHub, Argos also posts a summary comment with a link to the dashboard.
44+
- The build is complete once all screenshots have been compared:
45+
- ✅ No differences → commit status set to _success_.
46+
- ❌ Differences found → commit status set to _failed_. The changes are visible in the Argos app for review and approval.
47+
- Argos notifies the Git providers (GitHub, GitLab, etc.) about the build status.
48+
- On GitHub, Argos also posts a summary comment with a link to the dashboard.
49+
- On Git providers, if branch protection rules require Argos checks to pass, pull requests will be blocked from merging until all visual changes are reviewed and approved in Argos.
4250

4351
5. **Approval Process**
4452

45-
- The team reviews differences in the Argos dashboard.
46-
- Changes are either approved or rejected.
47-
- The commit status updates accordingly.
48-
- If branch protection requires passing visual tests, the PR cannot be merged until approvals are granted.
53+
- The team reviews the changes in the Argos app:
54+
- Each screenshot change can be approved or rejected.
55+
- The build as a whole must then be approved or rejected. The check status on Git providers (GitHub, GitLab, etc.) is automatically updated accordingly.
4956

5057
```mermaid
5158
graph TD;
5259
A[Code Commit & optional PR] --> B[CI runs visual tests with Argos];
5360
B --> C[Screenshots uploaded & compared to Baseline Build];
5461
C --> D[Results & Notifications];
55-
D --> E[Team reviews in Argos dashboard];
62+
D --> E[Team reviews in Argos app];
5663
E -->|Approved| F[Merged to main/reference branch];
5764
E -->|Changes Requested| G[Fix Issues & Retest];
5865
F --> H[New Baseline established for future comparisons];
@@ -64,11 +71,11 @@ In CI mode, Argos integrates directly with your Git provider to surface results
6471

6572
- **Commit status updates**: Each build sets the commit status to ✅ success or ❌ failed.
6673
- **Pull request comments**: On GitHub, Argos posts a summary comment with a link to the Argos dashboard.
67-
- **Slack notifications**: For faster team awareness, you can enable [Slack notifications](/slack-notifications). This ensures your team is notified immediately when visual differences are detected.
74+
- **Slack notifications**: Enable [Slack notifications](/slack-notifications) to alert your team immediately when visual differences are detected.
6875

6976
### Use Cases
7077

71-
CI mode is designed to be the primary workflow for preventing regressions during development. Typical scenarios include:
78+
CI mode is designed to be the primary workflow for preventing regressions during development. Common scenarios include:
7279

7380
#### 1. Pull Request Validation
7481

@@ -93,9 +100,9 @@ Follow the [Get Started guide](/getting-started) to integrate Argos into your CI
93100

94101
## Monitoring Mode
95102

96-
Monitoring mode is an **opt-in feature** in Argos that tracks visual changes outside the standard CI flow. It runs periodically on a chosen branch or before a release, providing continuous oversight of your project’s visuals.
103+
Monitoring mode is an **opt-in feature** in Argos. It is designed to track visual changes outside the standard CI flow, either on a schedule or before a release.
97104

98-
In this mode, screenshots are compared against the **latest approved build only**. Git history is ignored; the approval status alone defines the baseline.
105+
In this mode, your tests capture screenshots on the chosen branch (e.g., main or a release branch). The screenshots are uploaded to Argos and compared only against the **latest approved build**. Git history is ignored. The approval status alone defines the baseline.
99106

100107
### Workflow
101108

@@ -105,7 +112,7 @@ In this mode, screenshots are compared against the **latest approved build only*
105112

106113
2. **Run Periodic Visual Tests**
107114

108-
- Argos captures screenshots on the target branch (e.g., daily, weekly, or before a release).
115+
- Your tests capture screenshots on the target branch (daily, weekly, or before a release).
109116

110117
3. **Compare with Latest Approved Build**
111118

@@ -129,16 +136,15 @@ graph TD;
129136

130137
### Notifications
131138

132-
The most effective way to use Monitoring mode is to enable [**Slack notifications**](/slack-notifications).
133-
This ensures your team is alerted immediately when visual differences are detected, so you can review and act quickly.
139+
Enable [**Slack notifications**](/slack-notifications) to be alerted immediately when visual differences are detected, so your team can review and act quickly.
134140

135141
### Use Cases
136142

137-
Monitoring mode is useful when you need visual oversight beyond standard CI/CD pipelines:
143+
Monitoring mode is useful when you need oversight beyond standard CI/CD pipelines:
138144

139145
#### 1. Regular Health Checks
140146

141-
- **When:** Your live project changes often (content or style tweaks) but doesn’t justify running CI each time.
147+
- **When:** Your project changes frequently (content or style tweaks) but running CI on every change isn't practical.
142148
- **How:** Schedule monitoring on the main branch (e.g., daily/weekly) to catch unexpected changes early.
143149

144150
#### 2. Pre-release Validation

docs/learn/baseline-build.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ A **baseline build** serves as the reference point for comparing screenshots to
2424

2525
Argos selects the baseline build by finding the most recent **candidate build** that meets all of the following conditions:
2626

27-
- Has the same build name as the triggered build
28-
- All framework tests passed
29-
- Be auto-approved, manually approved or orphan
30-
- Its commit is an ancestor of the merge base between the triggered build's commit and the baseline branch
27+
1. Has the same build name as the triggered build
28+
2. All framework tests passed
29+
3. Be auto-approved, manually approved or orphan
30+
4. Its commit is an ancestor of the merge base between the triggered build's commit and the baseline branch
3131

3232
## What is the baseline branch?
3333

0 commit comments

Comments
 (0)