X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=.gitlab-ci.yml;h=bebd97efbcb65a21382b092f7c7c6029f302c1bb;hb=01652167d0c5f9fe95a0b51c8cf6d11f7b1dae56;hp=c3192fbf239d30a9c89f7755f05fe0d08c6408dc;hpb=d058e1c9786f1731822ac7be6dae02c02d8d6e4d;p=akkoma diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c3192fbf2..bebd97efb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,4 @@ -image: elixir:1.9.4 +image: git.pleroma.social:5050/pleroma/pleroma/ci-base variables: &global_variables POSTGRES_DB: pleroma_test @@ -26,12 +26,7 @@ stages: before_script: - echo $MIX_ENV - rm -rf _build/*/lib/pleroma - - apt-get update && apt-get install -y cmake - - mix local.hex --force - - mix local.rebar --force - mix deps.get - - apt-get -qq update - - apt-get install -y libmagic-dev after_script: - rm -rf _build/*/lib/pleroma @@ -79,7 +74,6 @@ unit-testing: - "**/*.ex" - "**/*.exs" - "mix.lock" - retry: 2 cache: &testing_cache_policy <<: *global_cache_policy policy: pull @@ -89,11 +83,31 @@ unit-testing: alias: postgres command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"] script: - - apt-get update && apt-get install -y libimage-exiftool-perl ffmpeg - mix ecto.create - mix ecto.migrate - mix coveralls --preload-modules +unit-testing-erratic: + stage: test + retry: 2 + only: + changes: + - "**/*.ex" + - "**/*.exs" + - "mix.lock" + cache: &testing_cache_policy + <<: *global_cache_policy + policy: pull + + services: + - name: postgres:13 + alias: postgres + command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"] + script: + - mix ecto.create + - mix ecto.migrate + - mix test --only=erratic + # Removed to fix CI issue. In this early state it wasn't adding much value anyway. # TODO Fix and reinstate federated testing # federated-testing: @@ -117,7 +131,6 @@ unit-testing-rum: - "**/*.ex" - "**/*.exs" - "mix.lock" - retry: 2 cache: *testing_cache_policy services: - name: minibikini/postgres-with-rum:12 @@ -127,7 +140,6 @@ unit-testing-rum: <<: *global_variables RUM_ENABLED: "true" script: - - apt-get update && apt-get install -y libimage-exiftool-perl ffmpeg - mix ecto.create - mix ecto.migrate - "mix ecto.migrate --migrations-path priv/repo/optional_migrations/rum_indexing/" @@ -142,6 +154,10 @@ lint: - "**/*.exs" - "mix.lock" cache: *testing_cache_policy + before_script: + - mix local.hex --force + - mix local.rebar --force + - mix deps.get script: - mix format --check-formatted @@ -165,8 +181,13 @@ cycles: - "**/*.exs" - "mix.lock" cache: {} - script: + before_script: + - mix local.hex --force + - mix local.rebar --force - mix deps.get + - apt-get update + - apt-get install cmake libmagic-dev -y + script: - mix compile - mix xref graph --format cycles --label compile | awk '{print $0} END{exit ($0 != "No cycles found")}' @@ -244,7 +265,7 @@ stop_review_app: amd64: stage: release - image: elixir:1.10.3 + image: elixir:1.10.4 only: &release-only - stable@pleroma/pleroma - develop@pleroma/pleroma @@ -282,7 +303,7 @@ amd64-musl: stage: release artifacts: *release-artifacts only: *release-only - image: elixir:1.10.3-alpine + image: elixir:1.10.4-alpine cache: *release-cache variables: *release-variables before_script: &before-release-musl @@ -310,7 +331,7 @@ arm-musl: only: *release-only tags: - arm32-specified - image: arm32v7/elixir:1.10.3-alpine + image: arm32v7/elixir:1.10.4-alpine cache: *release-cache variables: *release-variables before_script: *before-release-musl @@ -334,7 +355,7 @@ arm64-musl: only: *release-only tags: - arm - image: arm64v8/elixir:1.10.3-alpine + image: arm64v8/elixir:1.10.4-alpine cache: *release-cache variables: *release-variables before_script: *before-release-musl