# Setting up an Elm project to use CircleCI

**URL:** <https://discourse.elm-lang.org/t/setting-up-an-elm-project-to-use-circleci/8543>\
**Category:** Learn\
**Created:** [August 1, 2022, 2:36pm UTC](https://discourse.elm-lang.org/t/setting-up-an-elm-project-to-use-circleci/8543 "2022-08-01T14:36:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Carl](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/carl/32/4542_2.png) [@Carl](https://discourse.elm-lang.org/u/Carl)\
**Post date:** [August 1, 2022, 2:36pm UTC](https://discourse.elm-lang.org/t/setting-up-an-elm-project-to-use-circleci/8543/1 "2022-08-01T14:36:05Z")

</div>

I have a simple first Elm app. I’d like to apply CircleCI to the workflow.

I’ve been reading [setup instructions](https://elm-tooling.github.io/elm-tooling-cli/ci/) but as this is my first use of Elm, CircleCI, and npm I’m still a little vague on the details.

Am I best creating a new directory and starting from scratch setting up the project?

My current project (and github repository) has `package.json` and `elm-tooling.json`. The former has `"postinstall": "elm-tooling install"`.

And once I’ve set-up CircleCI does that mean anyone pulling the project from Github won’t have a project that can be built, except with CircleCI?

If this post is too CircleCI and not enough Elm, I’d understand and can delete it.

---

<div class="post-metadata">

**Author:** ![lydell](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/lydell/32/178_2.png) [@lydell](https://discourse.elm-lang.org/u/lydell)\
**Post date:** [August 2, 2022, 7:30am UTC](https://discourse.elm-lang.org/t/setting-up-an-elm-project-to-use-circleci/8543/2 "2022-08-02T07:30:28Z")

</div>

The way CIs work is:

1. It clones your repo and `cd`s into it.
2. You run some installation commands of choice. (Some CIs run `npm ci` or whatnot automatically for you for convenience if you don’t specify anything.)
3. You run some test commands of choice.

Basically, you already have a repo (folder), a way to install stuff and a way to test stuff, and now you’re specifying to the CI how to do those things in an automated way. Usually, you don’t need to change much in your repo – it’s more about adding some config file, like `config.yml`. This does not lock you or other people into only being able to build there.

I would start with the simplest possible thing I can think of – even if it feels suboptimal. Once that works, I’d look into if I can speed it up or so. You can ignore the elm-tooling instructions to begin with if you’re starting out with CIs – that document talks more about optimal caching and stuff that you can dive into later.

---

<div class="post-metadata">

**Author:** ![akoppela](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/akoppela/32/250_2.png) [@akoppela](https://discourse.elm-lang.org/u/akoppela)\
**Post date:** [August 2, 2022, 8:57am UTC](https://discourse.elm-lang.org/t/setting-up-an-elm-project-to-use-circleci/8543/3 "2022-08-02T08:57:33Z")

</div>

If you host your app on GitHub why not just use GitHub actions? One platform, great integration, etc…

---

<div class="post-metadata">

**Author:** ![Carl](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/carl/32/4542_2.png) [@Carl](https://discourse.elm-lang.org/u/Carl)\
**Post date:** [August 2, 2022, 9:35am UTC](https://discourse.elm-lang.org/t/setting-up-an-elm-project-to-use-circleci/8543/4 "2022-08-02T09:35:53Z")

</div>

I’d wanted to go with Github Actions first but finding an elm page about CircleCI (lightly) suggested that CircleCI was a more popular choice for Elm developers.

But KISS is my mantra 🙂  
So… it’s off to Actions I go.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/elm_lang/original/1X/50a05e53677a2c3b47776d7abd0f113eb50193a1.png) [@system](https://discourse.elm-lang.org/u/system)\
**Post date:** [August 12, 2022, 9:36am UTC](https://discourse.elm-lang.org/t/setting-up-an-elm-project-to-use-circleci/8543/5 "2022-08-12T09:36:21Z")

</div>

Closed on August 12, 2022, 9:36am UTC

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.
