image: elixir:latest
cache:
key: "$CI_JOB_NAME"
paths:
- deps
- _build
- /root/.mix
variables:
MIX_ENV: "test"
before_script:
- mix local.hex --force
- mix local.rebar --force
- mix deps.get --only test
test:
stage: test
script:
- mix test
credo:
- mix credo
audit:
- mix hex.audit
format:
- mix format --check-formatted
pages:
stage: deploy
- mix docs -o public
artifacts:
- public
only:
- main
package:
- /^v[0-9]+\.[0-9]+\.[0-9]+$/
- mix hex.build
- "wopr-*.tar"