Skip to content

Commit

Permalink
dev: skip test in release flow
Browse files Browse the repository at this point in the history
  • Loading branch information
linyimin0812 committed May 12, 2024
1 parent ac32a18 commit e67c661
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
restore-keys: ${{ runner.os }}-m2

- name: Build spring-startup-analyzer
run: make all
run: make all-skip-tests

- name: Package plugin and create userscript
run: |
Expand Down
47 changes: 46 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ else
cd ./spring-profiler-extension && $(MVN) clean -Drevision=$(VERSION)
endif

.PHONY: clean-skip-tests
clean-skip-tests:
ifeq ($(strip $(VERSION)),)
$(MVN) clean -Dmaven.test.skip=true
cd ./spring-profiler-extension && $(MVN) clean -Dmaven.test.skip=true
else
$(MVN) clean -Drevision=$(VERSION) -Dmaven.test.skip=true
cd ./spring-profiler-extension && $(MVN) clean -Drevision=$(VERSION) -Dmaven.test.skip=true
endif

.PHONY: package
package: clean install
ifeq ($(strip $(VERSION)),)
Expand All @@ -24,6 +34,18 @@ endif
mkdir -p ./build && rm -rf ./build/* && cp -r ~/${PROJECT_NAME}/* ./build/ && rm -rf ./build/${PROJECT_NAME}.tar.gz


.PHONY: package-skip-tests
package-skip-tests: clean-skip-tests install-skip-tests
ifeq ($(strip $(VERSION)),)
${MVN} package -pl '!coverage-report-aggregate,!spring-startup-cli' -Dmaven.test.skip=true
cd ./spring-profiler-extension && ${MVN} package -Dmaven.test.skip=true
else
${MVN} package -Drevision=$(VERSION) -pl '!coverage-report-aggregate,!spring-startup-cli' -Dmaven.test.skip=true
cd ./spring-profiler-extension && ${MVN} package -Drevision=$(VERSION) -Dmaven.test.skip=true
endif
mkdir -p ./build && rm -rf ./build/* && cp -r ~/${PROJECT_NAME}/* ./build/ && rm -rf ./build/${PROJECT_NAME}.tar.gz


.PHONY: install
install: clean
ifeq ($(strip $(VERSION)),)
Expand All @@ -34,6 +56,16 @@ else
cd ./spring-profiler-extension && ${MVN} install -Drevision=$(VERSION)
endif

.PHONY: install-skip-tests
install-skip-tests: clean-skip-tests
ifeq ($(strip $(VERSION)),)
${MVN} install -pl '!coverage-report-aggregate,!spring-startup-cli' -Dmaven.test.skip=true
cd ./spring-profiler-extension && ${MVN} install -Dmaven.test.skip=true
else
${MVN} install -Drevision=$(VERSION) -pl '!coverage-report-aggregate,!spring-startup-cli' -Dmaven.test.skip=true
cd ./spring-profiler-extension && ${MVN} install -Drevision=$(VERSION) -Dmaven.test.skip=true
endif

.PHONY: deploy
deploy: clean
ifeq ($(strip $(VERSION)),)
Expand All @@ -44,6 +76,16 @@ else
cd ./spring-profiler-extension && ${MVN} deploy -Drevision=$(VERSION)
endif

.PHONY: deploy-skip-tests
deploy-skip-tests: clean-skip-tests
ifeq ($(strip $(VERSION)),)
${MVN} deploy -pl '!coverage-report-aggregate,!spring-startup-cli' -Dmaven.test.skip=true
cd ./spring-profiler-extension && ${MVN} deploy -Dmaven.test.skip=true
else
${MVN} deploy -Drevision=$(VERSION)
cd ./spring-profiler-extension && ${MVN} deploy -Drevision=$(VERSION) -Dmaven.test.skip=true
endif

.PHONY: docker-build
docker-build: package
ifeq ($(strip $(VERSION)),)
Expand All @@ -58,4 +100,7 @@ tar:
cd ${INSTALL_DIR} && tar -zcvf ${PROJECT_NAME}.tar.gz ./lib/ ./config/ ./template

.PHONY: all
all: clean install package tar
all: clean install package tar

.PHONY: all-skip-tests
all-skip-tests: clean-skip-tests install-skip-tests package-skip-tests tar

0 comments on commit e67c661

Please sign in to comment.