Skip to content

Commit

Permalink
refactor(ci): split test stage into build, lint, test
Browse files Browse the repository at this point in the history
  • Loading branch information
swarthy committed May 26, 2024
1 parent eeede99 commit 692297d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/branches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,6 @@ jobs:
- run: docker compose up -d redis1 redis2 redis3
- run: docker compose run waiter

- run: yarn build
- run: yarn lint
- run: yarn test-ci-with-coverage
2 changes: 2 additions & 0 deletions .github/workflows/pull-requests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,6 @@ jobs:
- run: docker compose up -d redis1 redis2 redis3
- run: docker compose run waiter

- run: yarn build
- run: yarn lint
- run: yarn test
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
"main": "lib/index.js",
"module": "es/index.js",
"scripts": {
"test": "eslint --ext .js,.ts . && mocha",
"test-ci-with-coverage": "eslint --ext .js,.ts . && nyc mocha && nyc report --reporter=text-lcov | coveralls",
"lint": "eslint --ext .js,.ts .",
"test": "mocha",
"test-ci-with-coverage": "nyc mocha && nyc report --reporter=text-lcov | coveralls",
"coverage-html": "nyc mocha && nyc report --reporter=html",
"converalls": "nyc mocha && nyc report --reporter=text-lcov | coveralls",
"dev": "mocha -w",
"check-types": "tsc -b tsconfig.check-types.json",
"build": "yarn build-commonjs",
"build-commonjs": "rm -rf lib && yarn tsc -b tsconfig.build-commonjs.json",
"build-es": "rm -rf es && yarn tsc -b tsconfig.build-es.json",
"preversion": "yarn test && yarn build"
"preversion": "yarn lint && yarn test && yarn build"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit 692297d

Please sign in to comment.