Skip to content

Commit

Permalink
test: run tests from within container
Browse files Browse the repository at this point in the history
  • Loading branch information
fredriklindberg committed Jul 27, 2023
1 parent 1a774b0 commit 0bee97a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
.PHONY: test builder.build image.build image.xbuild image.xbuild.latest image.xbuild.unstable

0 comments on commit 0bee97a

Please sign in to comment.