diff --git a/.github/workflows/run_test_cases.yaml b/.github/workflows/run_test_cases.yaml index 3b65fe885..b4b797621 100644 --- a/.github/workflows/run_test_cases.yaml +++ b/.github/workflows/run_test_cases.yaml @@ -51,6 +51,12 @@ jobs: eunit_and_proper: needs: prepare runs-on: aws-amd64 + strategy: + fail-fast: false + matrix: + profile: + - emqx + - emqx-enterprise defaults: run: shell: bash @@ -63,14 +69,20 @@ jobs: name: source path: . - name: unzip source code + env: + PROFILE: ${{ matrix.profile }} run: unzip -o -q source.zip # produces eunit.coverdata - name: eunit + env: + PROFILE: ${{ matrix.profile }} working-directory: source run: make eunit # produces proper.coverdata - name: proper + env: + PROFILE: ${{ matrix.profile }} working-directory: source run: make proper @@ -136,7 +148,7 @@ jobs: - uses: actions/upload-artifact@v1 if: failure() with: - name: logs_${{ matrix.otp_release }} + name: logs_${{ matrix.otp_release }}-${{ matrix.profile }} path: source/_build/test/logs ct: @@ -198,7 +210,7 @@ jobs: - uses: actions/upload-artifact@v3 if: failure() with: - name: logs_${{ matrix.otp_release }} + name: logs_${{ matrix.otp_release }}-${{ matrix.profile }} path: source/_build/test/logs make_cover: diff --git a/Makefile b/Makefile index 2c3077acc..a363a467d 100644 --- a/Makefile +++ b/Makefile @@ -64,7 +64,7 @@ $(REBAR): prepare ensure-rebar3 .PHONY: eunit 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 proper: $(REBAR) @@ -72,7 +72,7 @@ proper: $(REBAR) .PHONY: ct 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 static_checks: @@ -85,7 +85,7 @@ APPS=$(shell $(SCRIPTS)/find-apps.sh) define gen-app-ct-target $1-ct: $(REBAR) @$(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 $(foreach app,$(APPS),$(eval $(call gen-app-ct-target,$(app)))) diff --git a/rebar.config.erl b/rebar.config.erl index a4265cae3..17c94374c 100644 --- a/rebar.config.erl +++ b/rebar.config.erl @@ -181,14 +181,10 @@ warn_profile_env() -> %% this function is only used for test/check profiles get_edition_from_profille_env() -> case os:getenv("PROFILE") of - "emqx" -> - ce; - "emqx-" ++ _ -> - ce; - "emqx-enterprise" -> - ee; - "emqx-enterprise-" ++ _ -> + "emqx-enterprise" ++ _ -> ee; + "emqx" ++ _ -> + ce; false -> ee; V ->