-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
51 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,98 +1,65 @@ | ||
version: 2.1 | ||
|
||
install_hex_rebar: &install_hex_rebar | ||
run: | ||
name: Install hex and rebar | ||
command: | | ||
mix local.hex --force | ||
mix local.rebar --force | ||
latest: &latest | ||
pattern: "^1.17.*-erlang-27.*$" | ||
|
||
install_system_deps: &install_system_deps | ||
run: | ||
name: Install system dependencies | ||
command: | | ||
apk add build-base | ||
defaults: &defaults | ||
working_directory: ~/repo | ||
tags: &tags | ||
[ | ||
1.17.3-erlang-27.1-alpine-3.20.3, | ||
1.16.3-erlang-26.2.5-alpine-3.19.1, | ||
1.15.7-erlang-26.2.4-alpine-3.18.6, | ||
1.14.5-erlang-25.3.2.11-alpine-3.17.7, | ||
1.13.4-erlang-24.3.4.17-alpine-3.16.9 | ||
] | ||
|
||
jobs: | ||
build_elixir_1_17_otp_27: | ||
build-test: | ||
parameters: | ||
tag: | ||
type: string | ||
docker: | ||
- image: hexpm/elixir:1.17.2-erlang-27.0.1-alpine-3.20.1 | ||
<<: *defaults | ||
- image: hexpm/elixir:<< parameters.tag >> | ||
working_directory: ~/repo | ||
environment: | ||
LC_ALL: C.UTF-8 | ||
steps: | ||
- <<: *install_system_deps | ||
- run: | ||
name: Install system dependencies | ||
command: apk add --no-cache build-base | ||
- checkout | ||
- <<: *install_hex_rebar | ||
- run: | ||
name: Install hex and rebar | ||
command: | | ||
mix local.hex --force | ||
mix local.rebar --force | ||
- restore_cache: | ||
keys: | ||
- v2-mix-cache-{{ checksum "mix.lock" }} | ||
- v1-mix-cache-<< parameters.tag >>-{{ checksum "mix.lock" }} | ||
- run: mix deps.get | ||
- run: mix deps.unlock --check-unused | ||
- run: mix compile | ||
- run: mix docs | ||
- run: mix hex.build | ||
- run: mix test | ||
- run: mix format --check-formatted | ||
- run: mix credo --ignore-checks "refactor" | ||
- run: mix dialyzer | ||
- run: mix compile --warnings-as-errors | ||
- run: MIX_ENV=test mix compile --warnings-as-errors | ||
- run: mix test || mix test | ||
- when: | ||
condition: | ||
matches: { <<: *latest, value: << parameters.tag >> } | ||
steps: | ||
- run: mix format --check-formatted | ||
- run: mix deps.unlock --check-unused | ||
- run: mix docs | ||
- run: mix hex.build | ||
- run: mix credo -a --strict --ignore-checks "refactor" | ||
- run: mix dialyzer | ||
- save_cache: | ||
key: v2-mix-cache-{{ checksum "mix.lock" }} | ||
key: v1-mix-cache-<< parameters.tag >>-{{ checksum "mix.lock" }} | ||
paths: | ||
- _build | ||
- deps | ||
|
||
build_elixir_1_15_otp_26: | ||
docker: | ||
- image: hexpm/elixir:1.15.2-erlang-26.0.2-alpine-3.18.2 | ||
<<: *defaults | ||
steps: | ||
- <<: *install_system_deps | ||
- checkout | ||
- <<: *install_hex_rebar | ||
- run: mix deps.get | ||
- run: mix compile | ||
- run: mix test | ||
|
||
build_elixir_1_14_otp_25: | ||
docker: | ||
- image: hexpm/elixir:1.14.3-erlang-25.2.3-alpine-3.18.0 | ||
<<: *defaults | ||
steps: | ||
- <<: *install_system_deps | ||
- checkout | ||
- <<: *install_hex_rebar | ||
- run: mix deps.get | ||
- run: mix compile | ||
- run: mix test | ||
|
||
build_elixir_1_13_otp_25: | ||
docker: | ||
- image: hexpm/elixir:1.13.4-erlang-25.3.2-alpine-3.18.0 | ||
steps: | ||
- <<: *install_system_deps | ||
- checkout | ||
- <<: *install_hex_rebar | ||
- run: mix deps.get | ||
- run: mix compile | ||
- run: mix test | ||
|
||
build_elixir_1_12_otp_24: | ||
docker: | ||
- image: hexpm/elixir:1.12.1-erlang-24.0.2-alpine-3.13.3 | ||
steps: | ||
- <<: *install_system_deps | ||
- checkout | ||
- <<: *install_hex_rebar | ||
- run: mix deps.get | ||
- run: mix compile | ||
|
||
workflows: | ||
build_test: | ||
checks: | ||
jobs: | ||
- build_elixir_1_17_otp_27 | ||
- build_elixir_1_15_otp_26 | ||
- build_elixir_1_14_otp_25 | ||
- build_elixir_1_13_otp_25 | ||
- build_elixir_1_12_otp_24 | ||
- build-test: | ||
name: << matrix.tag >> | ||
matrix: | ||
parameters: | ||
tag: *tags |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters