12
12
- issue-*
13
13
14
14
permissions :
15
- statuses : write
16
- checks : write
17
- contents : write
18
- pull-requests : write
15
+ statuses : write
16
+ checks : write
17
+ contents : write
18
+ pull-requests : write
19
19
20
20
jobs :
21
21
build :
22
- name : Build and Test
22
+ name : Build and Test
23
23
runs-on : ubuntu-latest
24
24
25
25
steps :
26
- - uses : actions/checkout@v4
27
- - name : Set up JDK 17
28
- uses : actions/setup-java@v4
29
- with :
30
- java-version : ' 17'
31
- distribution : ' temurin'
32
- cache : maven
26
+ - uses : actions/checkout@v4
27
+ - name : Set up JDK 17
28
+ uses : actions/setup-java@v4
29
+ with :
30
+ java-version : ' 17'
31
+ distribution : ' temurin'
32
+ cache : maven
33
33
34
- - name : Start Practice Software Testing ToolShop Website with Docker Compose
35
- run : docker compose -f docker-compose-toolshop.yml up -d
34
+ - name : Checkout Practice Software Testing repo
35
+ uses : actions/checkout@v4
36
+ with :
37
+ repository : testsmith-io/practice-software-testing
38
+ path : practice-repo
36
39
37
- - name : Sleep for 90 seconds
38
- run : sleep 90s
39
- shell : bash
40
+ - name : Start Practice Software Testing with Docker Compose
41
+ working-directory : practice-repo
42
+ run : docker compose -f docker-compose.yml up -d
40
43
41
- - name : Create and Seed Database
42
- run : docker compose -f docker-compose-toolshop.yml exec laravel-api php artisan migrate:fresh --seed
44
+ - name : Sleep for 60 seconds
45
+ run : sleep 60s
46
+ shell : bash
43
47
44
- - name : GET Version
45
- run : curl -v -X GET 'http://localhost:8091/status'
48
+ - name : Create and Seed Database
49
+ working-directory : practice-repo
50
+ run : |
51
+ docker compose exec laravel-api php artisan migrate:fresh --seed
46
52
47
- - name : POST login
48
- run : |
49
- curl -v -X POST 'http://localhost:8091/users/login' \
50
- -H 'Content-Type: application/json' \
51
- --data-raw '{"email":"customer@practicesoftwaretesting.com","password":"welcome01"}'
53
+ - name : Build Project and run tests
54
+ run : mvn clean install
52
55
53
- - name : Build Project and run tests
54
- run : mvn clean install
56
+ - name : Upload screenshots
57
+ if : always()
58
+ uses : actions/upload-artifact@v4
59
+ with :
60
+ name : test-screenshots
61
+ path : screenshots
55
62
56
- - name : Upload screenshots
57
- if : always()
58
- uses : actions/upload-artifact@v4
59
- with :
60
- name : test-screenshots
61
- path : screenshots
62
-
63
- - name : Stop Practice Software Testing ToolShop Website
64
- run : docker compose -f docker-compose-toolshop.yml down --remove-orphans
65
-
66
- - name : Test Report
67
- uses : dorny/test-reporter@v2
68
- if : success() || failure()
69
- with :
70
- name : Test Results
71
- path : ${{ github.workspace }}/target/surefire-reports/TEST-TestSuite.xml
72
- reporter : java-junit
73
- java-version : 17
63
+ - name : Test Report
64
+ uses : dorny/test-reporter@v2
65
+ if : success() || failure()
66
+ with :
67
+ name : Test Results
68
+ path : ${{ github.workspace }}/target/surefire-reports/TEST-TestSuite.xml
69
+ reporter : java-junit
70
+ java-version : 17
0 commit comments