1- name : " 📦 Package › Tests"
2- run-name : " 📦 Package › Tests"
1+ name : ' 📦 Package › Tests'
2+ run-name : ' 📦 Package › Tests'
33
44on :
55 push :
1010
1111 pull_request :
1212 workflow_dispatch :
13-
13+
1414jobs :
1515 job-tests-run :
1616 name : >-
2020 strategy :
2121 matrix :
2222 os : [windows-latest, macOS-latest, ubuntu-latest]
23- node-version : [14.x, 16.x, 18.x, 20.x, 21.x]
24-
23+ node-version : [16.x, 18.x, 20.x, 21.x, 22.x]
2524 runs-on : ${{ matrix.os }}
2625 env :
2726 CI : true
@@ -30,37 +29,37 @@ jobs:
3029 packages : write
3130 steps :
3231
33- # ---------------------------------------------------------------------------------------
32+ # #
3433 # Job > Tests > Fix Line Endings
35- # ---------------------------------------------------------------------------------------
34+ # #
3635
37- - name : " 🛒 Fix Git Checkout Line Endings"
36+ - name : ' 🛒 Fix Git Checkout Line Endings'
3837 id : task_tests_git-fixlines
3938 run : |
4039 git config --global core.autocrlf input
4140
42- # ---------------------------------------------------------------------------------------
41+ # #
4342 # Job > Tests > Checkout
44- # ---------------------------------------------------------------------------------------
43+ # #
4544
46- - name : " ☑️ Checkout"
45+ - name : ' ☑️ Checkout'
4746 id : task_tests_run_checkout
4847 uses : actions/checkout@v4
4948
50- # ---------------------------------------------------------------------------------------
49+ # #
5150 # Job > Tests > Cancel existing runs
52- # ---------------------------------------------------------------------------------------
51+ # #
5352
54- - name : " 🛑 Cancel Previous Runs"
53+ - name : ' 🛑 Cancel Previous Runs'
5554 uses : styfle/cancel-workflow-action@0.12.1
5655 with :
5756 access_token : ${{ secrets.ADMINSERV_TOKEN_CL }}
5857
59- # ---------------------------------------------------------------------------------------
58+ # #
6059 # Job > Tests > Setup Node
61- # ---------------------------------------------------------------------------------------
60+ # #
6261
63- - name : " ⚙️ Setup Node"
62+ - name : ' ⚙️ Setup Node'
6463 id : task_tests_node_setup
6564 uses : actions/setup-node@v4
6665 with :
@@ -69,20 +68,25 @@ jobs:
6968 always-auth : true
7069 scope : ' @aetherinox'
7170
72- # ---------------------------------------------------------------------------------------
71+ # #
7372 # Job > Tests > Get NPM Cache Directory
74- # ---------------------------------------------------------------------------------------
73+ #
74+ # must set `shell:bash` otherwise command will fail on Windows runner.
75+ # bash can be used for both Linux and Windows
76+ # #
7577
76- - name : " 📂 Get NPM Cache Directory"
78+ - name : ' 📂 Get NPM Cache Directory'
7779 id : task_tests_npm_cache_dir_get
80+ shell : bash
7881 run : |
79- echo "::set-output name=dir::$(npm config get cache)"
82+ cacheDir=$(npm config get cache)
83+ echo "dir=$cacheDir" >> $GITHUB_OUTPUT
8084
81- # ---------------------------------------------------------------------------------------
85+ # #
8286 # Job > Tests > NPM Cache
83- # ---------------------------------------------------------------------------------------
87+ # #
8488
85- - name : " 📑 NPM cache"
89+ - name : ' 📑 NPM cache'
8690 id : task_tests_npm_cache_dir_run # use this to check for `cache-hit` ==> if: steps.task_tests_npm_cache_dir_run.outputs.cache-hit != 'true'
8791 uses : actions/cache@v4
8892 with :
@@ -91,38 +95,38 @@ jobs:
9195 restore-keys : |
9296 ${{ runner.OS }}-node-
9397
94- # ---------------------------------------------------------------------------------------
98+ # #
9599 # Job > Tests > NPM Install
96- # ---------------------------------------------------------------------------------------
100+ # #
97101
98- - name : " 📦 NPM › Install"
102+ - name : ' 📦 NPM › Install'
99103 id : task_tests_npm_install
100104 run : |
101105 npm install
102106
103- # ---------------------------------------------------------------------------------------
107+ # #
104108 # Job > Tests > NPM Pretty and Linter
105- # ---------------------------------------------------------------------------------------
109+ # #
106110
107- - name : " 📦 NPM › Pretty & Linter"
111+ - name : ' 📦 NPM › Pretty & Linter'
108112 id : task_tests_npm_prettylint
109113 run : |
110114 npm run pretty
111115 npm run lint
112116
113- # ---------------------------------------------------------------------------------------
117+ # #
114118 # Job > Tests > Run Validation Script
115- # ---------------------------------------------------------------------------------------
119+ # #
116120
117- - name : " ▶️ Run Build"
121+ - name : ' ▶️ Run Build'
118122 run : |
119123 npm run validate
120124
121- # ---------------------------------------------------------------------------------------
125+ # #
122126 # Job > Tests > Upload Coverage to Codecov
123- # ---------------------------------------------------------------------------------------
127+ # #
124128
125- - name : " 📝 Upload Coverage Reports › Codecov"
129+ - name : ' 📝 Upload Coverage Reports › Codecov'
126130 id : task_tests_codecov_upload
127131 uses : codecov/codecov-action@v4
128132 with :
@@ -133,17 +137,17 @@ jobs:
133137 CI_OS : ${{ matrix.os }}
134138 NODE_VERSION : ${{ matrix.node-version }}
135139
136- # ---------------------------------------------------------------------------------------
140+ # #
137141 # JOB > TESTS > COMPLETE
138- # ---------------------------------------------------------------------------------------
142+ # #
139143
140144 job-tests-complete :
141145 name : >-
142146 📦 Tests › Complete
143147 needs : job-tests-run
144148 runs-on : ubuntu-latest
145149 steps :
146- - name : " ☑️ Tests Complete"
150+ - name : ' ☑️ Tests Complete'
147151 id : task_tests_complete
148152 run : |
149- echo 'Tests passed'
153+ echo 'Tests passed'
0 commit comments