See elixir_ci.yml
(complete example to use)
See Elixir CI Workflow ๐งช
(workflow runs for this repository)
- recommended by GitHub
- easy to use
- name: Install Erlang/OTP + Elixir ๐๏ธ
id: setup-beam
uses: erlef/setup-beam@v1
with:
otp-version: '24.0' # version range or exact (required)
elixir-version: '1.12.0' # version range or exact (required)
# install-hex: true (default)
# install-rebar: true (default)
# outputs: ${steps.setup-beam.outputs.(opt, elixir, rebar3)-version} (exact version installed)
Typical mix
steps
- deps ๐
- compile (+ format, credo, dialyzer, docs) ๐ง
- test (+ cover/age) ๐ฆบ
- upload artifacts (doc, cover) ๐
Save
- personal time โฑ๏ธ
- GitHub account action minutes ๐
- name: Restore dependency/build cache ๐๏ธ
uses: actions/cache@v2
with:
path: |
deps
_build
# cache key is hierarchical: OS, otp-version, elixir-version, mix.lock
key: ${{ runner.os }}-mix-${{ steps.setup-beam.outputs.otp-version }}-${{ steps.setup-beam.outputs.elixir-version }}-${{ hashFiles('**/mix.lock') }}
# restore keys are tried on cache misses, and only match the key prefix
restore-keys: |
${{ runner.os }}-mix-${{ steps.setup-beam.outputs.otp-version }}-${{ steps.setup-beam.outputs.elixir-version }}-
${{ runner.os }}-mix-${{ steps.setup-beam.outputs.otp-version }}-
${{ runner.os }}-mix-
Action generates a results status badge:
for use in readme.md
, dashboards, etc:
https://github.com/<OWNER>/<REPOSITORY>/actions/workflows/<WORKFLOW_FILE>/badge.svg