1212 - issue-*
1313
1414permissions :
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
1919
2020jobs :
2121 build :
22- name : Build and Test
22+ name : Build and Test
2323 runs-on : ubuntu-latest
2424
2525 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
3333
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
3639
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
4043
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
4347
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
4652
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":"[email protected] ","password":"welcome01"}' 53+ - name : Build Project and run tests
54+ run : mvn clean install
5255
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
5562
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