Merge pull request #8717 from zmstone/0814-ci-fix-missing-coverage
0814 ci fix missing coverage
This commit is contained in:
commit
e8dc7bc1b0
|
@ -51,6 +51,12 @@ jobs:
|
||||||
eunit_and_proper:
|
eunit_and_proper:
|
||||||
needs: prepare
|
needs: prepare
|
||||||
runs-on: aws-amd64
|
runs-on: aws-amd64
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
profile:
|
||||||
|
- emqx
|
||||||
|
- emqx-enterprise
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
shell: bash
|
shell: bash
|
||||||
|
@ -63,14 +69,20 @@ jobs:
|
||||||
name: source
|
name: source
|
||||||
path: .
|
path: .
|
||||||
- name: unzip source code
|
- name: unzip source code
|
||||||
|
env:
|
||||||
|
PROFILE: ${{ matrix.profile }}
|
||||||
run: unzip -o -q source.zip
|
run: unzip -o -q source.zip
|
||||||
# produces eunit.coverdata
|
# produces eunit.coverdata
|
||||||
- name: eunit
|
- name: eunit
|
||||||
|
env:
|
||||||
|
PROFILE: ${{ matrix.profile }}
|
||||||
working-directory: source
|
working-directory: source
|
||||||
run: make eunit
|
run: make eunit
|
||||||
|
|
||||||
# produces proper.coverdata
|
# produces proper.coverdata
|
||||||
- name: proper
|
- name: proper
|
||||||
|
env:
|
||||||
|
PROFILE: ${{ matrix.profile }}
|
||||||
working-directory: source
|
working-directory: source
|
||||||
run: make proper
|
run: make proper
|
||||||
|
|
||||||
|
@ -136,7 +148,7 @@ jobs:
|
||||||
- uses: actions/upload-artifact@v1
|
- uses: actions/upload-artifact@v1
|
||||||
if: failure()
|
if: failure()
|
||||||
with:
|
with:
|
||||||
name: logs_${{ matrix.otp_release }}
|
name: logs_${{ matrix.otp_release }}-${{ matrix.profile }}
|
||||||
path: source/_build/test/logs
|
path: source/_build/test/logs
|
||||||
|
|
||||||
ct:
|
ct:
|
||||||
|
@ -198,7 +210,7 @@ jobs:
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
if: failure()
|
if: failure()
|
||||||
with:
|
with:
|
||||||
name: logs_${{ matrix.otp_release }}
|
name: logs_${{ matrix.otp_release }}-${{ matrix.profile }}
|
||||||
path: source/_build/test/logs
|
path: source/_build/test/logs
|
||||||
|
|
||||||
make_cover:
|
make_cover:
|
||||||
|
|
6
Makefile
6
Makefile
|
@ -64,7 +64,7 @@ $(REBAR): prepare ensure-rebar3
|
||||||
|
|
||||||
.PHONY: eunit
|
.PHONY: eunit
|
||||||
eunit: $(REBAR) conf-segs
|
eunit: $(REBAR) conf-segs
|
||||||
@ENABLE_COVER_COMPILE=1 $(REBAR) eunit -v -c
|
@ENABLE_COVER_COMPILE=1 $(REBAR) eunit -v -c --cover_export_name $(PROFILE)-eunit
|
||||||
|
|
||||||
.PHONY: proper
|
.PHONY: proper
|
||||||
proper: $(REBAR)
|
proper: $(REBAR)
|
||||||
|
@ -72,7 +72,7 @@ proper: $(REBAR)
|
||||||
|
|
||||||
.PHONY: ct
|
.PHONY: ct
|
||||||
ct: $(REBAR) conf-segs
|
ct: $(REBAR) conf-segs
|
||||||
@ENABLE_COVER_COMPILE=1 $(REBAR) ct --name $(CT_NODE_NAME) -c -v
|
@ENABLE_COVER_COMPILE=1 $(REBAR) ct --name $(CT_NODE_NAME) -c -v --cover_export_name $(PROFILE)-ct
|
||||||
|
|
||||||
.PHONY: static_checks
|
.PHONY: static_checks
|
||||||
static_checks:
|
static_checks:
|
||||||
|
@ -85,7 +85,7 @@ APPS=$(shell $(SCRIPTS)/find-apps.sh)
|
||||||
define gen-app-ct-target
|
define gen-app-ct-target
|
||||||
$1-ct: $(REBAR)
|
$1-ct: $(REBAR)
|
||||||
@$(SCRIPTS)/pre-compile.sh $(PROFILE)
|
@$(SCRIPTS)/pre-compile.sh $(PROFILE)
|
||||||
@ENABLE_COVER_COMPILE=1 $(REBAR) ct --name $(CT_NODE_NAME) -c -v --cover_export_name $(subst /,-,$1) --suite $(shell $(SCRIPTS)/find-suites.sh $1)
|
@ENABLE_COVER_COMPILE=1 $(REBAR) ct --name $(CT_NODE_NAME) -c -v --cover_export_name $(PROFILE)-$(subst /,-,$1) --suite $(shell $(SCRIPTS)/find-suites.sh $1)
|
||||||
endef
|
endef
|
||||||
$(foreach app,$(APPS),$(eval $(call gen-app-ct-target,$(app))))
|
$(foreach app,$(APPS),$(eval $(call gen-app-ct-target,$(app))))
|
||||||
|
|
||||||
|
|
|
@ -181,14 +181,10 @@ warn_profile_env() ->
|
||||||
%% this function is only used for test/check profiles
|
%% this function is only used for test/check profiles
|
||||||
get_edition_from_profille_env() ->
|
get_edition_from_profille_env() ->
|
||||||
case os:getenv("PROFILE") of
|
case os:getenv("PROFILE") of
|
||||||
"emqx" ->
|
"emqx-enterprise" ++ _ ->
|
||||||
ce;
|
|
||||||
"emqx-" ++ _ ->
|
|
||||||
ce;
|
|
||||||
"emqx-enterprise" ->
|
|
||||||
ee;
|
|
||||||
"emqx-enterprise-" ++ _ ->
|
|
||||||
ee;
|
ee;
|
||||||
|
"emqx" ++ _ ->
|
||||||
|
ce;
|
||||||
false ->
|
false ->
|
||||||
ee;
|
ee;
|
||||||
V ->
|
V ->
|
||||||
|
|
Loading…
Reference in New Issue