|
12 | 12 |
|
13 | 13 | jobs: |
14 | 14 | unit-tests: |
15 | | - # changing the following value will significantly affect github's cost. Be careful and consult with the team before changing it. |
16 | | - runs-on: ubuntu-latest-32 |
| 15 | + runs-on: ubuntu-latest-16 |
17 | 16 | steps: |
18 | 17 | - uses: actions/checkout@v4 |
19 | 18 | with: |
20 | 19 | fetch-depth: 0 |
21 | 20 | - name: Setup backend |
22 | 21 | uses: ./.github/actions/setup-backend |
23 | | - - name: Test with pytest |
24 | | - timeout-minutes: 6 |
25 | | - run: | |
26 | | - uv run pytest --cov \ |
27 | | - -o junit_suite_name="${{github.job}}" \ |
28 | | - -n auto \ |
29 | | - -vv \ |
30 | | - --cov \ |
31 | | - --cov-append \ |
32 | | - --timeout 50 \ |
33 | | - --cov-report=xml \ |
34 | | - tests/unit |
| 22 | + - name: Run ATS and Tests |
| 23 | + uses: ./.github/actions/run_ats |
| 24 | + timeout-minutes: 15 |
| 25 | + with: |
| 26 | + default_tests: "tests/unit" |
| 27 | + codecov_static_token: ${{ secrets.CODECOV_STATIC_TOKEN }} |
| 28 | + codecov_token: ${{ secrets.CODECOV_TOKEN }} |
| 29 | + collect_args: "--timeout 15" |
| 30 | + codecov_flags: unit-tests |
| 31 | + |
35 | 32 | codemod-tests: |
36 | 33 | # TODO: re-enable when this check is a develop required check |
37 | 34 | if: false |
|
68 | 65 | env: |
69 | 66 | GITHUB_WORKSPACE: $GITHUB_WORKSPACE |
70 | 67 |
|
71 | | - # test_verified_codemods: |
72 | | - # # changing the following value will significantly affect github's cost. Be careful and consult with the team before changing it. |
73 | | - # if: false |
74 | | - # runs-on: ubuntu-latest-32 |
75 | | - # environment: testing |
76 | | - # concurrency: |
77 | | - # group: ${{ github.workflow }}-${{github.ref}}-${{github.event_name == 'push'&& github.sha}} |
78 | | - # cancel-in-progress: true |
79 | | - # name: "Verified Codemod tests: Sync Graph=false" |
80 | | - # steps: |
81 | | - # - uses: actions/checkout@v4 |
82 | | - # - name: Setup backend |
83 | | - # uses: ./.github/actions/setup-backend |
84 | | - # - name: Run ATS and Tests |
85 | | - # uses: ./.github/actions/run_ats |
86 | | - # with: |
87 | | - # default_tests: "tests/integration/codemod/test_verified_codemods.py" |
88 | | - # codecov_static_token: ${{ secrets.CODECOV_STATIC_TOKEN }} |
89 | | - # codecov_token: ${{ secrets.CODECOV_TOKEN }} |
90 | | - # collect_args: "--cli-api-key ${{ secrets.PROD_CLI_API_KEY }} --token ${{ secrets.CODEGEN_BOT_GHE_TOKEN }}" |
91 | | - # ats_collect_args: "--cli-api-key=${{ secrets.PROD_CLI_API_KEY }},--token=${{ secrets.CODEGEN_BOT_GHE_TOKEN }}," |
92 | | - # base_sha: ${{github.event_name == 'pull_request' && github.event.pull_request.base.sha || github.event.before}} |
93 | | - # job_name: ${{ github.job }} |
94 | | - # codecov_flags: smart-tests-verified-codemod-tests |
95 | | - # env: |
96 | | - # CODEGEN_BOT_GHE_TOKEN: ${{ secrets.CODEGEN_BOT_GHE_TOKEN }} |
97 | | - # GITHUB_WORKSPACE: $GITHUB_WORKSPACE |
98 | | - |
99 | 68 | parse-tests: |
100 | 69 | runs-on: ubuntu-latest-32 |
101 | 70 | if: contains(github.event.pull_request.labels.*.name, 'parse-tests') || github.event_name == 'push' || github.event_name == 'workflow_dispatch' |
@@ -161,54 +130,7 @@ jobs: |
161 | 130 | } |
162 | 131 | ] |
163 | 132 | } |
164 | | - # test_codemod_diffs: |
165 | | - # # changing the following value will significantly affect github's cost. Be careful and consult with the team before changing it. |
166 | | - # runs-on: ubuntu-latest-16 |
167 | | - # |
168 | | - # steps: |
169 | | - # - uses: actions/checkout@v4 |
170 | | - # - name: Setup backend |
171 | | - # uses: ./.github/actions/setup-backend |
172 | | - # - name: Cache oss-repos |
173 | | - # uses: ./.github/actions/setup-oss-repos |
174 | | - # with: |
175 | | - # CODEGEN_BOT_GHE_TOKEN: ${{ secrets.CODEGEN_BOT_GHE_TOKEN }} |
176 | | - # - name: Test with pytest |
177 | | - # timeout-minutes: 10 |
178 | | - # run: | |
179 | | - # ENV=local \ |
180 | | - # uv run pytest \ |
181 | | - # -n auto \ |
182 | | - # -vv \ |
183 | | - # --token $CODEGEN_BOT_GHE_TOKEN \ |
184 | | - # tests/codemod/test_diffs.py |
185 | | - # env: |
186 | | - # CODEGEN_BOT_GHE_TOKEN: ${{ secrets.CODEGEN_BOT_GHE_TOKEN }} |
187 | | - # GITHUB_WORKSPACE: $GITHUB_WORKSPACE |
188 | | - # |
189 | | - # - name: Publish Test Report (Verify diffs) |
190 | | - # uses: mikepenz/action-junit-report@v4 |
191 | | - # if: (success() || failure()) # always publish report even if the tests fail |
192 | | - # continue-on-error: true |
193 | | - # with: |
194 | | - # report_paths: "**/build/test-results/test/TEST.xml" |
195 | | - # detailed_summary: true |
196 | | - # annotate_only: true |
197 | 133 |
|
198 | | - # # Codecov is a required check but won't pass without a coverage report |
199 | | - # # Wwhen there are no changes in the backend (ex: frontend only change) we do an empty upload to force the check to pass |
200 | | - # - name: Upload empty coverage report to Codecov |
201 | | - # if: env.skip == '0' |
202 | | - # continue-on-error: true |
203 | | - # env: |
204 | | - # CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |
205 | | - # run: | |
206 | | - # cd codegen-backend |
207 | | - # pip install codecov-cli |
208 | | - # codecovcli create-commit -C ${{ github.event.pull_request.head.sha }} |
209 | | - # codecovcli create-report -C ${{ github.event.pull_request.head.sha }} |
210 | | - # codecovcli do-upload --disable-search --file empty_coverage.xml -C ${{ github.event.pull_request.head.sha }} |
211 | | - # codecovcli empty-upload --force -C ${{ github.event.pull_request.head.sha }} |
212 | 134 | integration-tests: |
213 | 135 | runs-on: ubuntu-latest-16 |
214 | 136 | steps: |
|
0 commit comments