-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
44 lines (38 loc) · 885 Bytes
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
stages:
- test
- deploy
default:
# Also change versions in Dockerfile
image: hexpm/elixir:1.16.1-erlang-26.2.2-debian-bullseye-20240130-slim
cache:
paths:
- deps/
- _build/
before_script:
# add `make` for bcrypt_elixir et al.
- apt-get update -y && apt-get install -y build-essential
- mix local.rebar --force
- mix local.hex --force
- mix deps.get --only test
# format:
# stage: test
# script:
# - mix format --check-formatted
# - mix compile --warnings-as-errors
# i18n:
# stage: test
# script:
# - mix gettext.extract --check-up-to-date
test:
stage: test
script:
- MIX_ENV=test mix compile --warnings-as-errors
- mix test
deploy:
stage: deploy
cache: []
before_script:
- apt-get update -y && apt-get install -y curl
- curl -L https://fly.io/install.sh | sh
script:
- /root/.fly/bin/flyctl deploy