Skip to content

Commit

Permalink
👷 rename one of the CIs' jobs and improve scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
VitorLuizC committed Sep 20, 2024
1 parent 4b5f462 commit 10d5bd1
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/continuous-integrations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
lint:
name: 'Run ESLint and Prettier'
name: 'Run ESLint, Prettier and TS'
runs-on: 'ubuntu-latest'
steps:
- name: 'Checkout the repository'
Expand Down
31 changes: 16 additions & 15 deletions run
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ function cleanup() {
npm install
}

function execute() {
echo -e "▶ executing '$1' script…\n"
bash run $1 | sed 's/^/ /'
echo -e "\n✅ '$1' script was completed!"
}

function doc() {
echo -e "🤖 generating documentation with Typedoc…\n"
typedoc "./src/index.ts"
Expand All @@ -55,13 +61,15 @@ function type-check() {
tsc --project ./tsconfig.json --noEmit
}

function check() {
echo -e "🔎 checking code style with ESLint…\n"
function lint() {
echo -e "🔎 linting code style with ESLint and Prettier…\n"
eslint
}

echo -e "▶ executing 'type-check' command…\n"
function check() {
execute lint
echo ""
bash run type-check
execute type-check
}

function autofix() {
Expand All @@ -75,20 +83,13 @@ function bundle() {
}

function prepublish-only() {
echo -e "▶ executing 'doc' command…\n"
bash run doc

execute doc
echo ""
echo -e "▶ executing 'check' command…\n"
bash run check

execute check
echo ""
echo -e "▶ executing 'test' command…\n"
bash run test

execute test
echo ""
echo -e "▶ executing 'bundle' command…\n"
bash run bundle
execute bundle
}

eval "$@"

0 comments on commit 10d5bd1

Please sign in to comment.