Skip to main content
Run a Node.js project’s tests and lint checks in RWX Cloud. Then run the same workflow again and see RWX reuse the results from its cache. You need Git, a terminal, and an RWX account. RWX installs Node.js and the project dependencies in the cloud.

Before you start

Create an RWX account and create or join an organization. Complete the account verification shown in onboarding so your trial credit is available. If your trial is waiting for verification, connect a supported version-control provider or use the support option shown on that page. This exercise clones a public repository. You can use it after trial activation without granting RWX access to one of your own private repositories. Check that Git is installed:
You should see a Git version number.

1. Install the CLI and sign in

On macOS or Windows Subsystem for Linux, install the CLI with Homebrew:
On Linux, follow Installing the CLI, then continue with these commands:
In the browser, choose the RWX organization you want to use. To limit this device’s permissions to workflows, turn off Inherit all of your permissions, select None, then select Manage under Runs. RWX also selects Create and Read, allowing the CLI to start, inspect, cancel, and retry runs. CLI authorization with inheritance off and only the three Runs permissions selected The example shows the Runs permissions using the run: search filter. Select Authorize, then return to your terminal. Confirm the CLI is signed in:
Check that the Organization line names the organization you selected.

2. Get the example project

Clone the public example and create a local branch at the version used in this exercise:
The project has 20 unit tests and a lint check. Keep your terminal in rwx-quickstart for the rest of this guide.

3. Add the workflow

Create .rwx/quickstart.yml and paste in this complete definition:
The code and node tasks prepare the project and runtime. npm-install uses both. The lint and test tasks use that prepared environment and can run independently. Check the definition:
You should see:

4. Run tests and lint in the cloud

Start the workflow and wait for its result:
Wait for the CLI to report:
Open the run URL printed by the CLI. In the Tasks view, look for these five tasks: The run should show Succeeded. If RWX has already run a task with the same inputs in your organization, that task may show Cached on this first run. Succeeded run showing the code, node, npm-install, lint, and test tasks Select the Tests tab to see the individual test results. Look for 20 Successful above the list. Tests tab showing 20 successful tests and individual passing results Your new workflow file is still local. The CLI sends local changes with the run, so this exercise does not require a commit or push.

5. See the cache reuse

Run the same definition again without changing any files:
Open the new run URL. All five tasks should show Cached, and the run should show Succeeded. RWX reused the earlier successful results because the task definitions and inputs stayed the same. Succeeded rerun showing Cached beside all five tasks You now have a passing cloud CI workflow and have seen it reuse an unchanged run.

If a step fails

Continue with your project

Continue learning with Catch and fix a local regression with RWX or Run commands in a cloud sandbox. Use the CI workflow guide to point the workflow at your own repository and checks. For a private GitHub repository, follow Getting started with GitHub to grant repository access and configure the clone token.