Skip to content
This repository has been archived by the owner on May 14, 2020. It is now read-only.

Set up mutation tests #167

Draft
wants to merge 13 commits into
base: master
Choose a base branch
from
1 change: 1 addition & 0 deletions .docker/docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ services:
- ../src/:/app/src
- ../package.json:/app/package.json
- ../package-lock.json:/app/package-lock.json
- ../stryker.conf.js:/app/stryker.conf.js
- ../test/:/app/test
- ../tsconfig.json:/app/tsconfig.json
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/.dependabot/
/.github/
/.scripts/
/.stryker-tmp/
/build/
/Makefile
/node_modules/
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ jobs:
- make lint
- make unit-test
- make integration-test
- make mutation-test
- TARGET=dev .github/smoke-test.sh
- TARGET=prod .github/smoke-test.sh
- TARGET=prod make api-validate
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/.stryker-tmp/
/build/
/node_modules/
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ ENV NODE_ENV=development
COPY .eslintignore \
.eslintrc.js \
jest.config.js \
stryker.conf.json \
tsconfig.json \
./
COPY --from=npm-dev /app/ .
Expand Down
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.DEFAULT_GOAL = help
.PHONY: help install gitmodules build start start-db init-db stop wait-healthy sh exec logs watch lint fix test unit-test integration-test api-validate api-test run dev prod
.PHONY: help install gitmodules build start start-db init-db stop wait-healthy sh exec logs watch lint fix test unit-test integration-test api-validate api-test mutation-test run dev prod

SHELL = /usr/bin/env bash

Expand Down Expand Up @@ -108,6 +108,11 @@ api-test: ## Run the API tests
$(MAKE) start wait-healthy
docker run --rm --init --network host --mount "type=bind,source=$(CURDIR)/test/hypertest/,destination=/tests" hydrofoil/hypertest:_0.4.1 --baseUri http://localhost:8080/; ${STOP_WITH_LOGS}

mutation-test: export TARGET = dev
mutation-test: ## Run the mutation tests
$(MAKE) start-db
${DOCKER_COMPOSE} run --rm app npm run test:mutation; ${STOP}

run:
$(MAKE) init-db
${DOCKER_COMPOSE} up --abort-on-container-exit --exit-code-from app; ${STOP}
Expand Down