2026-02-09 09:01:16 +04:00
|
|
|
when:
|
2026-02-14 18:27:45 +01:00
|
|
|
- event: pull_request
|
2026-05-02 10:39:49 +04:00
|
|
|
path: [ "**/*.ex", "**/*.eex", "**/*.exs", "mix.lock", ".woodpecker/**" ]
|
2026-02-14 18:27:45 +01:00
|
|
|
- event: push
|
2026-02-16 16:20:24 +01:00
|
|
|
branch: ${CI_REPO_DEFAULT_BRANCH}
|
2026-05-02 10:39:49 +04:00
|
|
|
path: [ "**/*.ex", "**/*.eex", "**/*.exs", "mix.lock", ".woodpecker/**" ]
|
2026-02-14 18:27:45 +01:00
|
|
|
|
|
|
|
|
depends_on:
|
2026-02-16 16:20:24 +01:00
|
|
|
- lint
|
2026-02-09 09:01:16 +04:00
|
|
|
|
2026-05-02 17:21:37 +04:00
|
|
|
labels:
|
|
|
|
|
platform: linux/amd64
|
|
|
|
|
|
2026-05-02 13:38:56 +04:00
|
|
|
variables:
|
|
|
|
|
script_file_entrypoint: &script_file_entrypoint
|
|
|
|
|
- /bin/sh
|
|
|
|
|
- -c
|
|
|
|
|
- 'printf "%s" "$CI_SCRIPT" | base64 -d > /tmp/ci-script.sh && /bin/sh -xe /tmp/ci-script.sh'
|
|
|
|
|
|
2026-02-09 09:01:16 +04:00
|
|
|
steps:
|
2026-02-14 18:27:45 +01:00
|
|
|
unit-testing-elixir-1.18:
|
2026-02-14 20:10:13 +01:00
|
|
|
image: elixir:1.18-otp-27-alpine
|
2026-05-02 13:38:56 +04:00
|
|
|
entrypoint: *script_file_entrypoint
|
2026-02-09 09:01:16 +04:00
|
|
|
environment:
|
|
|
|
|
MIX_ENV: test
|
|
|
|
|
DB_HOST: postgres
|
|
|
|
|
DB_PORT: 5432
|
|
|
|
|
commands:
|
|
|
|
|
- apk add --no-cache build-base cmake exiftool ffmpeg file-dev git openssl
|
|
|
|
|
- adduser -D -h /home/testuser testuser
|
|
|
|
|
- mkdir -p /home/testuser/.mix /home/testuser/.hex
|
|
|
|
|
- chown -R testuser:testuser . /home/testuser
|
|
|
|
|
- su testuser -c "HOME=/home/testuser mix local.hex --force"
|
|
|
|
|
- su testuser -c "HOME=/home/testuser mix local.rebar --force"
|
|
|
|
|
- su testuser -c "HOME=/home/testuser mix deps.get"
|
2026-02-14 16:29:59 +01:00
|
|
|
- su testuser -c "HOME=/home/testuser mix pleroma.test_runner --preload-modules"
|
2026-02-09 09:01:16 +04:00
|
|
|
|
|
|
|
|
services:
|
|
|
|
|
postgres:
|
|
|
|
|
image: postgres:13-alpine
|
|
|
|
|
environment:
|
|
|
|
|
POSTGRES_DB: pleroma_test
|
|
|
|
|
POSTGRES_USER: postgres
|
|
|
|
|
POSTGRES_PASSWORD: postgres
|