Skip to content

Commit

Permalink
add local pre-req script to bail early if tests will fail (#2083)
Browse files Browse the repository at this point in the history
add local pre-req script to bail early if tests will fail
  • Loading branch information
xavdid-stripe committed May 7, 2024
1 parent 9145412 commit dc9971f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Makefile
@@ -1,4 +1,4 @@
.PHONY: codegen-format update-version test ci-test
.PHONY: codegen-format update-version test check-prereqs ci-test
update-version:
@echo "$(VERSION)" > VERSION
@perl -pi -e 's|"version": "[.\-\d\w]+"|"version": "$(VERSION)"|' package.json
Expand All @@ -10,4 +10,10 @@ codegen-format:
ci-test:
yarn && yarn test

test: ci-test
check-prereqs:
# tests depend on `deno` being available
@command -v deno >/dev/null 2>&1 || { echo "Error: deno is not installed." >&2; exit 1; }
# stripe mock must be running; check its default port for a listener
@lsof -i :12112 >/dev/null 2>&1 || { echo "Error: stripe-mock is not running (on port 12112)." >&2; exit 1; }

test: check-prereqs ci-test

0 comments on commit dc9971f

Please sign in to comment.