Skip to content
This repository has been archived by the owner on Feb 25, 2022. It is now read-only.

ymtszw/elm_for_ci

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 

Repository files navigation

elm_for_ci

Docker Automated build Docker Build Status

Docker image with globally installed Elm compiler, elm-test, and other tools. Suitable for testing/building Elm applications or packages in docker-based CI.

  • Based on Alpine Linux image for smaller size (frol/docker-alpine-glibc)
  • make, git, ssh, bash, node, and yarn are installed
  • Global elm CLI is modified to be called via sysconfcpus as per the workaround discussed in this issue.
    • Since Elm 0.19, we can also use Haskell runtime system option like +RTS -N2
    • However, community tools that indirectly use elm may not support command line option passing, so in this image we keep wrapping global elm CLI with sysconfcpus.
    • Number of cores passed to elm CLI can be customized using N_CORES environment variable. Defaults to 2.
  • Included CLI tools:

Example Usage

In CircleCI 2.0,

version: 2
jobs:
  test:
    docker:
      - image: ymtszw/elm_for_ci
    working_directory: ~/repo
    steps:
      - restore_cache:
          keys:
            - repo-{{ .Branch }}-{{ .Revision }}
            - repo-{{ .Branch }}-
            - repo-
      - checkout
      - run: elm-test
      - save_cache:
          paths:
            - .
          key: repo-{{ .Branch }}-{{ .Revision }}

workflows:
  version: 2
  build:
    jobs:
      - test

License

BSD-3-Clause