From 4078fd655c5ded6c8fef8615a4a2bca897b2afb1 Mon Sep 17 00:00:00 2001 From: Floatingghost Date: Mon, 27 May 2024 02:56:05 +0100 Subject: [PATCH 1/5] migrate CI config to v2 --- .woodpecker/build-amd64.yml | 5 +++-- .woodpecker/build-arm64.yml | 5 +++-- .woodpecker/docs.yml | 5 +++-- .woodpecker/lint.yml | 5 +++-- .woodpecker/test.yml | 11 +++-------- 5 files changed, 15 insertions(+), 16 deletions(-) diff --git a/.woodpecker/build-amd64.yml b/.woodpecker/build-amd64.yml index 938c62665..32bbd2456 100644 --- a/.woodpecker/build-amd64.yml +++ b/.woodpecker/build-amd64.yml @@ -1,4 +1,5 @@ -platform: linux/amd64 +labels: + platform: linux/amd64 depends_on: - test @@ -34,7 +35,7 @@ variables: - &clean "(rm -rf release || true) && (rm -rf _build || true) && (rm -rf /root/.mix)" - &mix-clean "mix deps.clean --all && mix clean" -pipeline: +steps: # Canonical amd64 debian-bookworm: image: hexpm/elixir:1.15.4-erlang-26.0.2-debian-bookworm-20230612 diff --git a/.woodpecker/build-arm64.yml b/.woodpecker/build-arm64.yml index 1ce1fac44..d84d96e77 100644 --- a/.woodpecker/build-arm64.yml +++ b/.woodpecker/build-arm64.yml @@ -1,4 +1,5 @@ -platform: linux/arm64 +labels: + platform: linux/arm64 depends_on: - test @@ -34,7 +35,7 @@ variables: - &clean "(rm -rf release || true) && (rm -rf _build || true) && (rm -rf /root/.mix)" - &mix-clean "mix deps.clean --all && mix clean" -pipeline: +steps: # Canonical arm64 debian-bookworm: image: hexpm/elixir:1.15.4-erlang-26.0.2-debian-bookworm-20230612 diff --git a/.woodpecker/docs.yml b/.woodpecker/docs.yml index cc4017659..be7444e28 100644 --- a/.woodpecker/docs.yml +++ b/.woodpecker/docs.yml @@ -1,4 +1,5 @@ -platform: linux/amd64 +labels: + platform: linux/amd64 depends_on: - test @@ -45,7 +46,7 @@ variables: - &clean "(rm -rf release || true) && (rm -rf _build || true) && (rm -rf /root/.mix)" - &mix-clean "mix deps.clean --all && mix clean" -pipeline: +steps: docs: <<: *on-point-release secrets: diff --git a/.woodpecker/lint.yml b/.woodpecker/lint.yml index 8308e57d7..a32099538 100644 --- a/.woodpecker/lint.yml +++ b/.woodpecker/lint.yml @@ -1,4 +1,5 @@ -platform: linux/amd64 +labels: + platform: linux/amd64 variables: - &scw-secrets @@ -41,7 +42,7 @@ variables: - &clean "(rm -rf release || true) && (rm -rf _build || true) && (rm -rf /root/.mix)" - &mix-clean "mix deps.clean --all && mix clean" -pipeline: +steps: lint: image: akkoma/ci-base:1.15-otp26 <<: *on-pr-open diff --git a/.woodpecker/test.yml b/.woodpecker/test.yml index c8b819ce8..81c779b50 100644 --- a/.woodpecker/test.yml +++ b/.woodpecker/test.yml @@ -1,4 +1,5 @@ -platform: linux/amd64 +labels: + platform: linux/amd64 depends_on: - lint @@ -12,12 +13,6 @@ matrix: - 25 - 26 include: - - ELIXIR_VERSION: 1.14 - OTP_VERSION: 25 - - ELIXIR_VERSION: 1.15 - OTP_VERSION: 25 - - ELIXIR_VERSION: 1.15 - OTP_VERSION: 26 - ELIXIR_VERSION: 1.16 OTP_VERSION: 26 @@ -73,7 +68,7 @@ services: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres -pipeline: +steps: test: image: akkoma/ci-base:${ELIXIR_VERSION}-otp${OTP_VERSION} <<: *on-pr-open From f32a7fd76a801a6cb511e5c9049d6275b755abe0 Mon Sep 17 00:00:00 2001 From: Floatingghost Date: Mon, 27 May 2024 03:02:02 +0100 Subject: [PATCH 2/5] arch is aarch64 now --- .woodpecker/build-arm64.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.woodpecker/build-arm64.yml b/.woodpecker/build-arm64.yml index d84d96e77..7bcdc1435 100644 --- a/.woodpecker/build-arm64.yml +++ b/.woodpecker/build-arm64.yml @@ -1,5 +1,5 @@ labels: - platform: linux/arm64 + platform: linux/aarch64 depends_on: - test From 73ead8656a70f2beada0bf7572d811430e0ff0df Mon Sep 17 00:00:00 2001 From: Floatingghost Date: Mon, 27 May 2024 03:25:18 +0100 Subject: [PATCH 3/5] don't allow emoji formatter to be async --- test/pleroma/emoji/formatter_test.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/pleroma/emoji/formatter_test.exs b/test/pleroma/emoji/formatter_test.exs index eafdd5a43..5a6b05d3d 100644 --- a/test/pleroma/emoji/formatter_test.exs +++ b/test/pleroma/emoji/formatter_test.exs @@ -4,7 +4,7 @@ defmodule Pleroma.Emoji.FormatterTest do alias Pleroma.Emoji.Formatter - use Pleroma.DataCase, async: true + use Pleroma.DataCase, async: false describe "emojify" do test "it adds cool emoji" do From 66b3248dd312ee8501a2ab316f4576ea101c2d79 Mon Sep 17 00:00:00 2001 From: Floatingghost Date: Mon, 27 May 2024 04:03:13 +0100 Subject: [PATCH 4/5] mix tests probably shouldn't be async --- test/mix/tasks/pleroma/app_test.exs | 2 +- test/mix/tasks/pleroma/database_test.exs | 2 +- test/mix/tasks/pleroma/ecto/rollback_test.exs | 2 +- test/mix/tasks/pleroma/ecto_test.exs | 2 +- test/mix/tasks/pleroma/emoji_test.exs | 2 +- test/pleroma/upload/filter/exiftool/read_description_test.exs | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/mix/tasks/pleroma/app_test.exs b/test/mix/tasks/pleroma/app_test.exs index a86bfaf97..c4dcc59cb 100644 --- a/test/mix/tasks/pleroma/app_test.exs +++ b/test/mix/tasks/pleroma/app_test.exs @@ -3,7 +3,7 @@ # SPDX-License-Identifier: AGPL-3.0-only defmodule Mix.Tasks.Pleroma.AppTest do - use Pleroma.DataCase, async: true + use Pleroma.DataCase, async: false setup_all do Mix.shell(Mix.Shell.Process) diff --git a/test/mix/tasks/pleroma/database_test.exs b/test/mix/tasks/pleroma/database_test.exs index 97fa830ff..f28bef51c 100644 --- a/test/mix/tasks/pleroma/database_test.exs +++ b/test/mix/tasks/pleroma/database_test.exs @@ -3,7 +3,7 @@ # SPDX-License-Identifier: AGPL-3.0-only defmodule Mix.Tasks.Pleroma.DatabaseTest do - use Pleroma.DataCase, async: true + use Pleroma.DataCase, async: false use Oban.Testing, repo: Pleroma.Repo alias Pleroma.Activity diff --git a/test/mix/tasks/pleroma/ecto/rollback_test.exs b/test/mix/tasks/pleroma/ecto/rollback_test.exs index 57a2ed655..0ddb5231a 100644 --- a/test/mix/tasks/pleroma/ecto/rollback_test.exs +++ b/test/mix/tasks/pleroma/ecto/rollback_test.exs @@ -3,7 +3,7 @@ # SPDX-License-Identifier: AGPL-3.0-only defmodule Mix.Tasks.Pleroma.Ecto.RollbackTest do - use Pleroma.DataCase, async: true + use Pleroma.DataCase, async: false import ExUnit.CaptureLog require Logger diff --git a/test/mix/tasks/pleroma/ecto_test.exs b/test/mix/tasks/pleroma/ecto_test.exs index 0164da5a8..eab2c2fcf 100644 --- a/test/mix/tasks/pleroma/ecto_test.exs +++ b/test/mix/tasks/pleroma/ecto_test.exs @@ -3,7 +3,7 @@ # SPDX-License-Identifier: AGPL-3.0-only defmodule Mix.Tasks.Pleroma.EctoTest do - use ExUnit.Case, async: true + use ExUnit.Case, async: false test "raise on bad path" do assert_raise RuntimeError, ~r/Could not find migrations directory/, fn -> diff --git a/test/mix/tasks/pleroma/emoji_test.exs b/test/mix/tasks/pleroma/emoji_test.exs index bd20f285c..6549fbb70 100644 --- a/test/mix/tasks/pleroma/emoji_test.exs +++ b/test/mix/tasks/pleroma/emoji_test.exs @@ -3,7 +3,7 @@ # SPDX-License-Identifier: AGPL-3.0-only defmodule Mix.Tasks.Pleroma.EmojiTest do - use ExUnit.Case, async: true + use ExUnit.Case, async: false import ExUnit.CaptureIO import Tesla.Mock diff --git a/test/pleroma/upload/filter/exiftool/read_description_test.exs b/test/pleroma/upload/filter/exiftool/read_description_test.exs index 7389fda47..f18da2371 100644 --- a/test/pleroma/upload/filter/exiftool/read_description_test.exs +++ b/test/pleroma/upload/filter/exiftool/read_description_test.exs @@ -3,7 +3,7 @@ # SPDX-License-Identifier: AGPL-3.0-only defmodule Pleroma.Upload.Filter.Exiftool.ReadDescriptionTest do - use Pleroma.DataCase, async: true + use Pleroma.DataCase, async: false alias Pleroma.Upload.Filter @uploads %Pleroma.Upload{ From ae19fd90c909ebd237bc29b83b75ee57b0bb6c8e Mon Sep 17 00:00:00 2001 From: Floatingghost Date: Mon, 27 May 2024 04:07:44 +0100 Subject: [PATCH 5/5] use elixir 1.16 for format checks --- .woodpecker/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.woodpecker/lint.yml b/.woodpecker/lint.yml index a32099538..623494301 100644 --- a/.woodpecker/lint.yml +++ b/.woodpecker/lint.yml @@ -44,7 +44,7 @@ variables: steps: lint: - image: akkoma/ci-base:1.15-otp26 + image: akkoma/ci-base:1.16-otp26 <<: *on-pr-open environment: MIX_ENV: test