Skip to main content
Version: 1.0-beta

Try Dagger

In this guide, you will add a Check to an example project. You will fix a failure and run the Check successfully.

Requirements​

Clone the example project​

Clone the repository and open its directory:

git clone --depth 1 https://github.com/dagger/hello-dagger.git
cd hello-dagger

Add a Check​

Install the official Prettier module:

dagger module install dagger.io/js/prettier

The command creates dagger.toml. It also adds a format-check Check for each Prettier project in the repository. hello-dagger has one, at its root.

Run the Check​

dagger check

format-check reports unformatted files. The command exits with an error.

Fix the formatting​

Run Prettier on the project in the current directory and apply its changeset:

dagger api call -y prettier project --path=. format

Verify the result​

Run the Check again:

dagger check

You are done when the output shows that dag://?check=prettier/projects/format-check passed.