|
8 | 8 | - 'v*' |
9 | 9 |
|
10 | 10 | jobs: |
11 | | - test: |
| 11 | + test-unit: |
12 | 12 | permissions: |
13 | 13 | contents: read |
14 | 14 | runs-on: ubuntu-latest |
|
70 | 70 | id: get_version |
71 | 71 | run: echo "VITE_BUILD_HASH=${GITHUB_REF#refs/tags/v}" >> "$GITHUB_ENV" |
72 | 72 |
|
73 | | - - name: Run build |
| 73 | + - name: Run Prod build |
74 | 74 | run: make build |
75 | 75 | env: |
76 | 76 | HUSKY: "0" |
|
88 | 88 | dist/ |
89 | 89 | dist_ui/ |
90 | 90 |
|
| 91 | + - name: Clean and run QA build |
| 92 | + run: rm -rf dist/ && rm -rf dist_ui/ && make build |
| 93 | + env: |
| 94 | + HUSKY: "0" |
| 95 | + VITE_RUN_ENVIRONMENT: qa |
| 96 | + RunEnvironment: qa |
| 97 | + |
| 98 | + - name: Upload Build files |
| 99 | + uses: actions/upload-artifact@v4 |
| 100 | + with: |
| 101 | + include-hidden-files: true |
| 102 | + name: build-qa |
| 103 | + path: | |
| 104 | + .aws-sam/ |
| 105 | + dist/ |
| 106 | + dist_ui/ |
| 107 | +
|
| 108 | + test-e2e: |
| 109 | + runs-on: ubuntu-latest |
| 110 | + timeout-minutes: 30 |
| 111 | + name: Run E2E testing |
| 112 | + concurrency: |
| 113 | + group: ${{ github.event.repository.name }}-dev-env |
| 114 | + cancel-in-progress: false |
| 115 | + permissions: |
| 116 | + id-token: write |
| 117 | + contents: read |
| 118 | + needs: |
| 119 | + - build |
| 120 | + environment: "AWS QA" |
| 121 | + steps: |
| 122 | + - uses: actions/checkout@v5 |
| 123 | + env: |
| 124 | + HUSKY: "0" |
| 125 | + |
| 126 | + - name: Set up Node for testing |
| 127 | + uses: actions/setup-node@v5 |
| 128 | + with: |
| 129 | + node-version: 22.x |
| 130 | + cache: "yarn" |
| 131 | + |
| 132 | + - name: Setup Terraform |
| 133 | + uses: hashicorp/setup-terraform@v3 |
| 134 | + with: |
| 135 | + terraform_version: 1.12.2 |
| 136 | + |
| 137 | + - name: Restore Yarn Cache |
| 138 | + uses: actions/cache@v4 |
| 139 | + with: |
| 140 | + path: node_modules |
| 141 | + key: yarn-modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}-dev |
| 142 | + restore-keys: | |
| 143 | + yarn-modules-${{ runner.arch }}-${{ runner.os }}- |
| 144 | +
|
| 145 | + - name: Download Build files |
| 146 | + uses: actions/download-artifact@v5 |
| 147 | + with: |
| 148 | + name: build-qa |
| 149 | + |
| 150 | + - uses: aws-actions/configure-aws-credentials@v5 |
| 151 | + with: |
| 152 | + role-to-assume: arn:aws:iam::427040638965:role/GitHubActionsRole |
| 153 | + role-session-name: Core_QA_Deployment_${{ github.run_id }} |
| 154 | + aws-region: us-east-2 |
| 155 | + |
| 156 | + - name: Publish to AWS |
| 157 | + run: make deploy_qa |
| 158 | + env: |
| 159 | + HUSKY: "0" |
| 160 | + VITE_RUN_ENVIRONMENT: dev |
| 161 | + |
| 162 | + - name: Run health check |
| 163 | + run: make dev_health_check |
| 164 | + |
| 165 | + - name: Run E2E testing |
| 166 | + run: make test_e2e |
| 167 | + env: |
| 168 | + JWT_KEY: ${{ secrets.JWT_KEY }} |
| 169 | + PLAYWRIGHT_USERNAME: ${{ secrets.PLAYWRIGHT_USERNAME }} |
| 170 | + PLAYWRIGHT_PASSWORD: ${{ secrets.PLAYWRIGHT_PASSWORD }} |
| 171 | + |
91 | 172 | deploy-prod: |
92 | 173 | runs-on: ubuntu-latest |
93 | 174 | timeout-minutes: 30 |
|
99 | 180 | id-token: write |
100 | 181 | contents: read |
101 | 182 | needs: |
102 | | - - test |
103 | | - - build |
| 183 | + - test-unit |
| 184 | + - test-e2e |
104 | 185 | environment: "AWS PROD" |
105 | 186 | steps: |
106 | 187 | - name: Set up Node for testing |
|
0 commit comments