@@ -20,37 +20,45 @@ jobs:
2020 runs-on : ubuntu-latest
2121
2222 steps :
23- - name : Checkout code
24- uses : actions/checkout@v2
23+ - name : Checkout Repository
24+ uses : actions/checkout@v4
2525
26- - name : Set up Node.js
27- uses : actions/setup-node@v2
26+ - name : Setup Node.js
27+ uses : actions/setup-node@v4
2828 with :
29- node-version : ' 14 ' # Adjust based on your project's needs
29+ node-version : ' 20.x '
3030
3131 - name : Install dependencies
32- run : npm install # Change if you're using another package manager
32+ 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
53- uses : actions/upload-artifact@v2
60+ uses : actions/upload-artifact@v4
61+ if : always()
5462 with :
5563 name : test-results
56- path : junit.xml
64+ path : test-report.html
0 commit comments