Skip to content

Commit 29513c6

Browse files
Changes in workflow
1 parent 1f28a99 commit 29513c6

File tree

1 file changed

+24
-16
lines changed

1 file changed

+24
-16
lines changed

.github/workflows/run-tests-by-group.yml

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,37 +20,45 @@ jobs:
2020
runs-on: ubuntu-latest
2121

2222
steps:
23-
- name: Checkout code
23+
- name: Checkout Repository
2424
uses: actions/checkout@v4
2525

26-
- name: Set up Node.js
26+
- name: Setup Node.js
2727
uses: actions/setup-node@v4
2828
with:
29-
node-version: '20'
29+
node-version: '20.x'
3030

3131
- name: Install dependencies
3232
run: npm install
3333

3434
- name: Run tests with group
3535
run: |
36-
if [ "${{ github.event.inputs.testGroup }}" == "all" ]; then
37-
npm run test:all
38-
elif [ "${{ github.event.inputs.testGroup }}" == "sanity" ]; then
39-
npm run test:sanity
40-
elif [ "${{ github.event.inputs.testGroup }}" == "single_character" ]; then
41-
npm run test:single_character
42-
elif [ "${{ github.event.inputs.testGroup }}" == "all_characters" ]; then
43-
npm run test:all_characters
44-
elif [ "${{ github.event.inputs.testGroup }}" == "multiple_characters" ]; then
45-
npm run test:multiple_characters
46-
elif [ "${{ github.event.inputs.testGroup }}" == "filter_characters" ]; then
47-
npm run test:filter_characters
48-
fi
36+
case "${{ github.event.inputs.testGroup }}" in
37+
all)
38+
npm run test:all
39+
;;
40+
sanity)
41+
npm run test:sanity
42+
;;
43+
single_character)
44+
npm run test:single_character
45+
;;
46+
all_characters)
47+
npm run test:all_characters
48+
;;
49+
multiple_characters)
50+
npm run test:multiple_characters
51+
;;
52+
filter_characters)
53+
npm run test:filter_characters
54+
;;
55+
esac
4956
env:
5057
CI: true
5158

5259
- name: Upload test results
5360
uses: actions/upload-artifact@v4
61+
if: always()
5462
with:
5563
name: test-results
5664
path: test-report.html

0 commit comments

Comments
 (0)