88 - main
99
1010jobs :
11- test-unit :
11+ test :
1212 runs-on : ubuntu-latest
1313 name : Run Unit Tests
1414 steps :
2020 uses : actions/setup-node@v4
2121 with :
2222 node-version : 22.x
23- cache : ' yarn'
23+ cache : " yarn"
2424
2525 - name : Restore Yarn Cache
2626 uses : actions/cache@v4
@@ -30,14 +30,47 @@ jobs:
3030 restore-keys : |
3131 yarn-modules-${{ runner.os }}-
3232
33- - name : Set up Python 3.11 for testing
34- uses : actions/setup-python@v5
35- with :
36- python-version : 3.11
37-
3833 - name : Run unit testing
3934 run : make test_unit
4035
36+ build :
37+ runs-on : ubuntu-latest
38+ name : Build Application
39+ steps :
40+ - uses : actions/checkout@v4
41+ env :
42+ HUSKY : " 0"
43+
44+ - name : Set up Node
45+ uses : actions/setup-node@v4
46+ with :
47+ node-version : 22.x
48+ cache : " yarn"
49+
50+ - name : Restore Yarn Cache
51+ uses : actions/cache@v4
52+ with :
53+ path : node_modules
54+ key : yarn-modules-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}-dev
55+ restore-keys : |
56+ yarn-modules-${{ runner.os }}-
57+
58+ - name : Run build
59+ run : make build
60+ env :
61+ HUSKY : " 0"
62+ VITE_RUN_ENVIRONMENT : dev
63+
64+ - name : Upload Build files
65+ uses : actions/upload-artifact@v4
66+ with :
67+ include-hidden-files : true
68+ name : build
69+ path : |
70+ .aws-sam/
71+ dist/
72+ dist_ui/
73+
4174 deploy-test-dev :
4275 runs-on : ubuntu-latest
4376 permissions :
4780 group : ${{ github.event.repository.name }}-dev-env
4881 cancel-in-progress : false
4982 environment : " AWS DEV"
50- name : Deploy to DEV and Run Tests
83+ name : Deploy to DEV and Run Live Tests
5184 needs :
52- - test-unit
85+ - test
86+ - build
5387 steps :
5488 - uses : actions/checkout@v4
5589 env :
5993 uses : actions/setup-node@v4
6094 with :
6195 node-version : 22.x
62- cache : ' yarn'
96+ cache : " yarn"
6397
6498 - name : Restore Yarn Cache
6599 uses : actions/cache@v4
@@ -69,6 +103,11 @@ jobs:
69103 restore-keys : |
70104 yarn-modules-${{ runner.os }}-
71105
106+ - name : Download Build files
107+ uses : actions/download-artifact@v4
108+ with :
109+ name : build
110+
72111 - uses : aws-actions/setup-sam@v2
73112 with :
74113 use-installer : true
@@ -93,13 +132,9 @@ jobs:
93132 - name : Run health check
94133 run : make dev_health_check
95134
96- - name : Run live testing
97- run : make test_live_integration
98- env :
99- JWT_KEY : ${{ secrets.JWT_KEY }}
100-
101- - name : Run E2E testing
102- run : make test_e2e
135+ - name : Run post-deploy testing (Live and E2E)
136+ run : make test_post_deploy -j 2
103137 env :
104138 PLAYWRIGHT_USERNAME : ${{ secrets.PLAYWRIGHT_USERNAME }}
105139 PLAYWRIGHT_PASSWORD : ${{ secrets.PLAYWRIGHT_PASSWORD }}
140+ JWT_KEY : ${{ secrets.JWT_KEY }}
0 commit comments