Skip to content

Commit 10d5bd1

Browse files
committed
👷 rename one of the CIs' jobs and improve scripts
1 parent 4b5f462 commit 10d5bd1

File tree

2 files changed

+17
-16
lines changed

2 files changed

+17
-16
lines changed

.github/workflows/continuous-integrations.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66

77
jobs:
88
lint:
9-
name: 'Run ESLint and Prettier'
9+
name: 'Run ESLint, Prettier and TS'
1010
runs-on: 'ubuntu-latest'
1111
steps:
1212
- name: 'Checkout the repository'

run

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ function cleanup() {
4040
npm install
4141
}
4242

43+
function execute() {
44+
echo -e "▶ executing '$1' script…\n"
45+
bash run $1 | sed 's/^/ /'
46+
echo -e "\n✅ '$1' script was completed!"
47+
}
48+
4349
function doc() {
4450
echo -e "🤖 generating documentation with Typedoc…\n"
4551
typedoc "./src/index.ts"
@@ -55,13 +61,15 @@ function type-check() {
5561
tsc --project ./tsconfig.json --noEmit
5662
}
5763

58-
function check() {
59-
echo -e "🔎 checking code style with ESLint…\n"
64+
function lint() {
65+
echo -e "🔎 linting code style with ESLint and Prettier…\n"
6066
eslint
67+
}
6168

62-
echo -e "▶ executing 'type-check' command…\n"
69+
function check() {
70+
execute lint
6371
echo ""
64-
bash run type-check
72+
execute type-check
6573
}
6674

6775
function autofix() {
@@ -75,20 +83,13 @@ function bundle() {
7583
}
7684

7785
function prepublish-only() {
78-
echo -e "▶ executing 'doc' command…\n"
79-
bash run doc
80-
86+
execute doc
8187
echo ""
82-
echo -e "▶ executing 'check' command…\n"
83-
bash run check
84-
88+
execute check
8589
echo ""
86-
echo -e "▶ executing 'test' command…\n"
87-
bash run test
88-
90+
execute test
8991
echo ""
90-
echo -e "▶ executing 'bundle' command…\n"
91-
bash run bundle
92+
execute bundle
9293
}
9394

9495
eval "$@"

0 commit comments

Comments
 (0)