File tree Expand file tree Collapse file tree 2 files changed +47
-0
lines changed
Expand file tree Collapse file tree 2 files changed +47
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Run Tests by Group
2+ on :
3+ workflow_dispatch :
4+ inputs :
5+ testGroup :
6+ description : ' Select a test group to filter tests'
7+ required : true
8+ default : ' all'
9+ options :
10+ - all
11+ - sanity
12+ - single_character
13+ - all_characters
14+ - multiple_characters
15+ - filter_characters
16+
17+ jobs :
18+ test :
19+ runs-on : ubuntu-latest
20+
21+ steps :
22+ - name : Checkout code
23+ uses : actions/checkout@v2
24+
25+ - name : Set up Node.js
26+ uses : actions/setup-node@v2
27+ with :
28+ node-version : ' 14' # Adjust based on your project's needs
29+
30+ - name : Install dependencies
31+ run : npm install # Change if you're using another package manager
32+
33+ - name : Run tests with group
34+ run : |
35+ if [ "${{ github.event.inputs.testGroup }}" == "all" ]; then
36+ npm run test:all
37+ if [ "${{ github.event.inputs.testGroup }}" == "sanity" ]; then
38+ npm run test:sanity
39+ if [ "${{ github.event.inputs.testGroup }}" == "single_character" ]; then
40+ npm run test:single_character
41+ if [ "${{ github.event.inputs.testGroup }}" == "all_characters" ]; then
42+ npm run test:all_characters
43+ if [ "${{ github.event.inputs.testGroup }}" == "multiple_characters" ]; then
44+ npm run test:multiple_characters
45+ if [ "${{ github.event.inputs.testGroup }}" == "filter_characters" ]; then
46+ npm run test:filter_characters
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ const BASE_URL = "https://rickandmortyapi.com/api/";
55
66/**
77 * Sanity Tests
8+ * Quick checks to ensure that the most crucial functionalities of an application are working properly.
89 * @group sanity_tests
910 */
1011describe ( "Rick and Morty API - Sanity Tests" , ( ) => {
You can’t perform that action at this time.
0 commit comments