|
1 | 1 | name: Test coverage |
2 | 2 | on: |
3 | | - pull_request: |
4 | 3 | # Run manually. |
5 | 4 | workflow_dispatch: {} |
6 | 5 | # https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_dispatch |
7 | 6 | # every day at 00:00 UTC. |
8 | | - schedule: |
9 | | - - cron: '0 0 * * *' |
| 7 | + # schedule: |
| 8 | + # - cron: '0 0 * * *' |
10 | 9 |
|
11 | 10 | env: |
12 | 11 | CSFY_CI: true |
@@ -124,59 +123,59 @@ jobs: |
124 | 123 | flags: slow |
125 | 124 | name: slow-test-coverage |
126 | 125 |
|
127 | | - - name: Run Superslow test and generate report |
128 | | - id: run_superslow |
129 | | - env: |
130 | | - GH_ACTION_ACCESS_TOKEN: ${{ secrets.GH_ACTION_ACCESS_TOKEN }} |
131 | | - CSFY_AWS_ACCESS_KEY_ID: ${{ env.AWS_ACCESS_KEY_ID }} |
132 | | - CSFY_AWS_SECRET_ACCESS_KEY: ${{ env.AWS_SECRET_ACCESS_KEY }} |
133 | | - CSFY_AWS_SESSION_TOKEN: ${{ env.AWS_SESSION_TOKEN }} |
134 | | - CSFY_AWS_DEFAULT_REGION: ${{ env.AWS_DEFAULT_REGION }} |
135 | | - CSFY_ECR_BASE_PATH: ghcr.io/${{ github.repository_owner }} |
136 | | - CSFY_AWS_S3_BUCKET: ${{ vars.CSFY_AWS_S3_BUCKET }} |
137 | | - run: | |
138 | | - # Determine the day of the week (1 = Monday, 7 = Sunday). |
139 | | - day_of_week=$(date +%u) |
140 | | - # Only run superslow tests on Mondays or if the workflow is manually triggered. |
141 | | - if [ "$day_of_week" = "1" ] || [ "${{ github.event_name }}" = "workflow_dispatch" ]; then |
142 | | - echo "Running superslow tests..." |
143 | | - invoke run_coverage --suite superslow |
144 | | - else |
145 | | - echo "Skipping superslow tests — today is not Monday and this is not a manual trigger" |
146 | | - exit 0 |
147 | | - fi |
148 | | -
|
149 | | - - name: Upload Superslow Test Coverage to Codecov |
150 | | - #TODO(Shaunak): Consider removing it when we turn this workflow into a reusable one. |
151 | | - if: steps.run_superslow.outcome == 'success' |
152 | | - uses: codecov/codecov-action@v5 |
153 | | - with: |
154 | | - token: ${{ secrets.CODECOV_TOKEN }} |
155 | | - files: ./coverage.xml |
156 | | - flags: superslow |
157 | | - name: superslow-test-coverage |
158 | | - |
159 | | - # Fail the job in CI if any of the fast/ slow run/ upload steps above failed. |
160 | | - - name: Fail if fast/slow test or upload failed |
161 | | - run: | |
162 | | - failed="" |
163 | | - if [ "${{ steps.run_fast.outcome }}" != "success" ]; then |
164 | | - echo "Fast test run failed" |
165 | | - failed="true" |
166 | | - fi |
167 | | - if [ "${{ steps.upload_fast.outcome }}" != "success" ]; then |
168 | | - echo "Fast test coverage upload failed" |
169 | | - failed="true" |
170 | | - fi |
171 | | - if [ "${{ steps.run_slow.outcome }}" != "success" ]; then |
172 | | - echo "Slow test run failed" |
173 | | - failed="true" |
174 | | - fi |
175 | | - if [ "${{ steps.upload_slow.outcome }}" != "success" ]; then |
176 | | - echo "Slow test coverage upload failed" |
177 | | - failed="true" |
178 | | - fi |
179 | | - if [ "$failed" = "true" ]; then |
180 | | - echo "At least one fast/slow test or upload step failed." |
181 | | - exit 1 |
182 | | - fi |
| 126 | + # - name: Run Superslow test and generate report |
| 127 | + # id: run_superslow |
| 128 | + # env: |
| 129 | + # GH_ACTION_ACCESS_TOKEN: ${{ secrets.GH_ACTION_ACCESS_TOKEN }} |
| 130 | + # CSFY_AWS_ACCESS_KEY_ID: ${{ env.AWS_ACCESS_KEY_ID }} |
| 131 | + # CSFY_AWS_SECRET_ACCESS_KEY: ${{ env.AWS_SECRET_ACCESS_KEY }} |
| 132 | + # CSFY_AWS_SESSION_TOKEN: ${{ env.AWS_SESSION_TOKEN }} |
| 133 | + # CSFY_AWS_DEFAULT_REGION: ${{ env.AWS_DEFAULT_REGION }} |
| 134 | + # CSFY_ECR_BASE_PATH: ghcr.io/${{ github.repository_owner }} |
| 135 | + # CSFY_AWS_S3_BUCKET: ${{ vars.CSFY_AWS_S3_BUCKET }} |
| 136 | + # run: | |
| 137 | + # # Determine the day of the week (1 = Monday, 7 = Sunday). |
| 138 | + # day_of_week=$(date +%u) |
| 139 | + # # Only run superslow tests on Mondays or if the workflow is manually triggered. |
| 140 | + # if [ "$day_of_week" = "1" ] || [ "${{ github.event_name }}" = "workflow_dispatch" ]; then |
| 141 | + # echo "Running superslow tests..." |
| 142 | + # invoke run_coverage --suite superslow |
| 143 | + # else |
| 144 | + # echo "Skipping superslow tests — today is not Monday and this is not a manual trigger" |
| 145 | + # exit 0 |
| 146 | + # fi |
| 147 | + |
| 148 | + # - name: Upload Superslow Test Coverage to Codecov |
| 149 | + # #TODO(Shaunak): Consider removing it when we turn this workflow into a reusable one. |
| 150 | + # if: steps.run_superslow.outcome == 'success' |
| 151 | + # uses: codecov/codecov-action@v5 |
| 152 | + # with: |
| 153 | + # token: ${{ secrets.CODECOV_TOKEN }} |
| 154 | + # files: ./coverage.xml |
| 155 | + # flags: superslow |
| 156 | + # name: superslow-test-coverage |
| 157 | + |
| 158 | + # # Fail the job in CI if any of the fast/ slow run/ upload steps above failed. |
| 159 | + # - name: Fail if fast/slow test or upload failed |
| 160 | + # run: | |
| 161 | + # failed="" |
| 162 | + # if [ "${{ steps.run_fast.outcome }}" != "success" ]; then |
| 163 | + # echo "Fast test run failed" |
| 164 | + # failed="true" |
| 165 | + # fi |
| 166 | + # if [ "${{ steps.upload_fast.outcome }}" != "success" ]; then |
| 167 | + # echo "Fast test coverage upload failed" |
| 168 | + # failed="true" |
| 169 | + # fi |
| 170 | + # if [ "${{ steps.run_slow.outcome }}" != "success" ]; then |
| 171 | + # echo "Slow test run failed" |
| 172 | + # failed="true" |
| 173 | + # fi |
| 174 | + # if [ "${{ steps.upload_slow.outcome }}" != "success" ]; then |
| 175 | + # echo "Slow test coverage upload failed" |
| 176 | + # failed="true" |
| 177 | + # fi |
| 178 | + # if [ "$failed" = "true" ]; then |
| 179 | + # echo "At least one fast/slow test or upload step failed." |
| 180 | + # exit 1 |
| 181 | + # fi |
0 commit comments