fix(ci): materialize rebar test src_dirs in shared test image. Refs EventHub/EventHubBack#36
This commit is contained in:
@@ -10,9 +10,17 @@ COPY src/ src/
|
||||
COPY test/unit/ test/unit/
|
||||
COPY test/api_*_SUITE.erl test/
|
||||
COPY test/api/ test/api/
|
||||
COPY docker/ci-test-prepare.sh /usr/local/bin/ci-test-prepare.sh
|
||||
RUN chmod +x /usr/local/bin/ci-test-prepare.sh
|
||||
|
||||
# default profile: CT (test/api); test profile: EUnit (test/unit)
|
||||
RUN rebar3 compile && rebar3 as test compile
|
||||
# default profile: CT (test/api); test profile: EUnit (test/unit).
|
||||
# rebar3 кладёт битые/symlink extra src_dirs; готовим реальные копии (как scripts/fix-rebar-unit-symlink.sh).
|
||||
RUN rebar3 compile \
|
||||
&& mkdir -p _build/test/lib/eventhub/test \
|
||||
&& (rebar3 as test compile || true) \
|
||||
&& ci-test-prepare.sh \
|
||||
&& rebar3 as test compile
|
||||
|
||||
# По умолчанию CT; для eunit: docker run … rebar3 eunit --sname ci_eunit --verbose
|
||||
ENTRYPOINT ["ci-test-prepare.sh"]
|
||||
CMD ["rebar3", "ct", "--sname", "ci_api_test", "-v"]
|
||||
|
||||
Reference in New Issue
Block a user