Skip to content

Commit 1bce8ad

Browse files
chore(ci): move unit tests back to 16 (#299)
# Motivation <!-- Why is this change necessary? --> # Content <!-- Please include a summary of the change --> # Testing <!-- How was the change tested? --> # Please check the following before marking your PR as ready for review - [ ] I have added tests for my changes - [ ] I have updated the documentation or added new documentation as needed
1 parent 1a8196b commit 1bce8ad

File tree

1 file changed

+11
-89
lines changed

1 file changed

+11
-89
lines changed

.github/workflows/unit-tests.yml

Lines changed: 11 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,23 @@ on:
1212

1313
jobs:
1414
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
1716
steps:
1817
- uses: actions/checkout@v4
1918
with:
2019
fetch-depth: 0
2120
- name: Setup backend
2221
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+
3532
codemod-tests:
3633
# TODO: re-enable when this check is a develop required check
3734
if: false
@@ -68,34 +65,6 @@ jobs:
6865
env:
6966
GITHUB_WORKSPACE: $GITHUB_WORKSPACE
7067

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-
9968
parse-tests:
10069
runs-on: ubuntu-latest-32
10170
if: contains(github.event.pull_request.labels.*.name, 'parse-tests') || github.event_name == 'push' || github.event_name == 'workflow_dispatch'
@@ -161,54 +130,7 @@ jobs:
161130
}
162131
]
163132
}
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
197133
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 }}
212134
integration-tests:
213135
runs-on: ubuntu-latest-16
214136
steps:

0 commit comments

Comments
 (0)