File tree Expand file tree Collapse file tree 2 files changed +39
-24
lines changed Expand file tree Collapse file tree 2 files changed +39
-24
lines changed Original file line number Diff line number Diff line change 88 - main
99
1010jobs :
11- test-build :
11+ test :
1212 runs-on : ubuntu-latest
1313 name : Run Unit Tests
1414 steps :
@@ -30,26 +30,45 @@ 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
41- - name : Run build
42- run : make build
36+ build :
37+ runs-on : ubuntu-latest
38+ name : Build Application
39+ steps :
40+ - uses : actions/checkout@v4
41+ env :
42+ HUSKY : " 0"
4343
44- - uses : actions/upload-artifact@v4
44+ - name : Set up Node
45+ uses : actions/setup-node@v4
4546 with :
46- name : dist-api
47- path : dist/
47+ node-version : 22.x
48+ cache : " yarn "
4849
49- - uses : actions/upload-artifact@v4
50+ - name : Restore Yarn Cache
51+ uses : actions/cache@v4
5052 with :
51- name : dist-ui
52- path : dist_ui/
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+ name : build
68+ path : |
69+ .aws-sam/
70+ dist/
71+ dist_ui/
5372
5473 deploy-test-dev :
5574 runs-on : ubuntu-latest
6281 environment : " AWS DEV"
6382 name : Deploy to DEV and Run Tests
6483 needs :
65- - test-build
84+ - test
85+ - build
6686 steps :
6787 - uses : actions/checkout@v4
6888 env :
@@ -82,15 +102,10 @@ jobs:
82102 restore-keys : |
83103 yarn-modules-${{ runner.os }}-
84104
85- - uses : actions/download-artifact@v4
86- with :
87- name : dist-api
88- path : dist/
89-
90- - uses : actions/download-artifact@v4
105+ - name : Download Build files
106+ uses : actions/download-artifact@v4
91107 with :
92- name : dist-ui
93- path : dist_ui/
108+ name : build
94109
95110 - uses : aws-actions/setup-sam@v2
96111 with :
Original file line number Diff line number Diff line change 5959 role-session-name : Core_Prod_Deployment_${{ github.run_id }}
6060 aws-region : us-east-1
6161 - name : Publish to AWS
62- run : make deploy_prod
62+ run : make build && make deploy_prod
6363 env :
6464 HUSKY : " 0"
6565 VITE_RUN_ENVIRONMENT : prod
You can’t perform that action at this time.
0 commit comments