Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions .github/read-me.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ This directory contains GitHub Actions workflows for continuous integration and

## PR Comment Commands

### `/run-skipped-ci` - Run Full CI Suite
### `/run-skipped-ci` (or `/run-skipped-tests`) - Run Full CI Suite

When you open a PR, CI automatically runs a subset of tests for faster feedback (latest Ruby/Node versions only). To run the **complete CI suite** including all dependency combinations, add a comment to your PR:

```
/run-skipped-ci
# or use the shorter alias:
/run-skipped-tests
```

This command will trigger:
Expand All @@ -33,7 +35,7 @@ By default, PRs run a subset of CI jobs to provide fast feedback:
- Skips example generator tests
- Skips some Pro package tests

This is intentional to keep PR feedback loops fast. However, before merging, you should verify compatibility across all supported versions. The `/run-skipped-ci` command makes this easy without waiting for the PR to be merged to master.
This is intentional to keep PR feedback loops fast. However, before merging, you should verify compatibility across all supported versions. The `/run-skipped-ci` (or `/run-skipped-tests`) command makes this easy without waiting for the PR to be merged to master.

### Security & Access Control

Expand All @@ -43,11 +45,11 @@ This is intentional to keep PR feedback loops fast. However, before merging, you
- Unauthorized access to Pro package tests
- Potential DoS attacks via repeated CI runs

If an unauthorized user attempts to use `/run-skipped-ci`, they'll receive a message explaining the restriction.
If an unauthorized user attempts to use `/run-skipped-ci` or `/run-skipped-tests`, they'll receive a message explaining the restriction.

### Concurrency Protection

Multiple `/run-skipped-ci` comments on the same PR will cancel in-progress runs to prevent resource waste and duplicate results.
Multiple `/run-skipped-ci` or `/run-skipped-tests` comments on the same PR will cancel in-progress runs to prevent resource waste and duplicate results.

## Testing Comment-Triggered Workflows

Expand Down Expand Up @@ -82,7 +84,7 @@ For more details, see [GitHub's documentation on issue_comment events](https://d

### Utility Workflows

- **`run-skipped-ci.yml`** - Triggered by `/run-skipped-ci` comment on PRs
- **`run-skipped-ci.yml`** - Triggered by `/run-skipped-ci` or `/run-skipped-tests` comment on PRs
- **`pr-welcome-comment.yml`** - Auto-comments on new PRs with helpful info
- **`detect-changes.yml`** - Detects which parts of the codebase changed

Expand All @@ -109,6 +111,6 @@ Many workflows use change detection to skip unnecessary jobs:

- Runs all jobs on pushes to `master`
- Runs only relevant jobs on PRs based on changed files
- Can be overridden with `workflow_dispatch` or `/run-skipped-ci` command
- Can be overridden with `workflow_dispatch` or `/run-skipped-ci` (or `/run-skipped-tests`) command

See `script/ci-changes-detector` for the change detection logic.
7 changes: 5 additions & 2 deletions .github/workflows/detect-invalid-ci-commands.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
contains(github.event.comment.body, '/help')
) &&
!contains(github.event.comment.body, '/run-skipped-ci') &&
!contains(github.event.comment.body, '/run-skipped-tests') &&
!contains(github.event.comment.body, '/stop-run-skipped-ci')
runs-on: ubuntu-22.04
permissions:
Expand All @@ -42,7 +43,7 @@ jobs:
}

// Valid commands
const validCommands = ['/run-skipped-ci', '/stop-run-skipped-ci'];
const validCommands = ['/run-skipped-ci', '/run-skipped-tests', '/stop-run-skipped-ci'];

// Check if any command is invalid
const invalidCommands = matches
Expand Down Expand Up @@ -78,7 +79,7 @@ jobs:

## Available GitHub Comment Commands

### 1. \\\`/run-skipped-ci\\\` - Enable Full CI Mode
### 1. \\\`/run-skipped-ci\\\` (or \\\`/run-skipped-tests\\\`) - Enable Full CI Mode
Triggers all CI workflows that were skipped due to unchanged code.

**What it does:**
Expand All @@ -93,6 +94,8 @@ jobs:
**Example:**
\\\`\\\`\\\`
/run-skipped-ci
# or use the shorter alias:
/run-skipped-tests
\\\`\\\`\\\`

---
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/run-skipped-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ jobs:
github.event.issue.pull_request &&
(
startsWith(github.event.comment.body, '/run-skipped-ci') ||
contains(github.event.comment.body, '\n/run-skipped-ci')
contains(github.event.comment.body, '\n/run-skipped-ci') ||
startsWith(github.event.comment.body, '/run-skipped-tests') ||
contains(github.event.comment.body, '\n/run-skipped-tests')
)
runs-on: ubuntu-22.04
permissions:
Expand Down Expand Up @@ -114,10 +116,11 @@ jobs:

// Map workflow names to workflow files
const workflowMap = {
'Main test': 'main.yml',
'Integration Tests': 'integration-tests.yml',
'Rspec test for gem': 'gem-tests.yml',
'Generator tests': 'examples.yml',
'React on Rails Pro - Integration Tests': 'pro-integration-tests.yml',
'React on Rails Pro - Package Tests': 'pro-package-tests.yml',
'React on Rails Pro - Package Tests': 'pro-test-package-and-gem.yml',
'React on Rails Pro - Lint': 'pro-lint.yml'
};

Expand Down
4 changes: 3 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -426,12 +426,14 @@ For more details, see [`docs/CI_OPTIMIZATION.md`](./docs/CI_OPTIMIZATION.md).

React on Rails provides PR comment commands to control CI behavior:

#### `/run-skipped-ci` - Enable Full CI Mode
#### `/run-skipped-ci` (or `/run-skipped-tests`) - Enable Full CI Mode

Runs all skipped CI checks and enables full CI mode for the PR:

```
/run-skipped-ci
# or use the shorter alias:
/run-skipped-tests
```

**What it does:**
Expand Down
Loading