diff --git a/.github/workflows/branch.yml b/.github/workflows/branch.yml index 10b424a..c2267e1 100644 --- a/.github/workflows/branch.yml +++ b/.github/workflows/branch.yml @@ -11,6 +11,10 @@ on: description: 'Publish container' required: true default: 'false' + run_tests: + description: 'Run tests' + required: true + default: 'true' jobs: build_and_test: @@ -19,14 +23,14 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Run tests - run: | - yarn install --frozen-lockfile - yarn run test test - - name: Prepare builder run: make builder.build + - name: Run tests + if: github.event.inputs.run_tests == 'true' + run: | + make test.container + - name: Build package run: | make package.build.container diff --git a/Makefile b/Makefile index 9878968..19ca7e6 100644 --- a/Makefile +++ b/Makefile @@ -42,6 +42,10 @@ package.build: mkdir -p dist yarn pack --no-default-rc --frozen-lockfile --filename dist/$(package_name) +test: + yarn install --no-default-rc --frozen-lockfile + yarn run test test + dist/exposrd-$(version).tgz: make package.build.container @@ -106,4 +110,4 @@ image.xbuild.latest: image.xbuild.unstable: docker buildx imagetools create --tag $(registry)/$(project):unstable $(registry)/$(project):$(version) -.PHONY: release release.publish builder.build image.build image.xbuild image.xbuild.latest image.xbuild.unstable \ No newline at end of file +.PHONY: test builder.build image.build image.xbuild image.xbuild.latest image.xbuild.unstable \ No newline at end of file