Skip to content

Commit baaaf95

Browse files
add back ats
1 parent b7a3c01 commit baaaf95

File tree

1 file changed

+10
-87
lines changed

1 file changed

+10
-87
lines changed

.github/workflows/unit-tests.yml

Lines changed: 10 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,16 @@ jobs:
1919
fetch-depth: 0
2020
- name: Setup backend
2121
uses: ./.github/actions/setup-backend
22-
- name: Test with pytest
23-
timeout-minutes: 6
24-
run: |
25-
uv run pytest --cov \
26-
-o junit_suite_name="${{github.job}}" \
27-
-n auto \
28-
-vv \
29-
--cov \
30-
--cov-append \
31-
--timeout 50 \
32-
--cov-report=xml \
33-
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+
3432
codemod-tests:
3533
# TODO: re-enable when this check is a develop required check
3634
if: false
@@ -67,34 +65,6 @@ jobs:
6765
env:
6866
GITHUB_WORKSPACE: $GITHUB_WORKSPACE
6967

70-
# test_verified_codemods:
71-
# # changing the following value will significantly affect github's cost. Be careful and consult with the team before changing it.
72-
# if: false
73-
# runs-on: ubuntu-latest-32
74-
# environment: testing
75-
# concurrency:
76-
# group: ${{ github.workflow }}-${{github.ref}}-${{github.event_name == 'push'&& github.sha}}
77-
# cancel-in-progress: true
78-
# name: "Verified Codemod tests: Sync Graph=false"
79-
# steps:
80-
# - uses: actions/checkout@v4
81-
# - name: Setup backend
82-
# uses: ./.github/actions/setup-backend
83-
# - name: Run ATS and Tests
84-
# uses: ./.github/actions/run_ats
85-
# with:
86-
# default_tests: "tests/integration/codemod/test_verified_codemods.py"
87-
# codecov_static_token: ${{ secrets.CODECOV_STATIC_TOKEN }}
88-
# codecov_token: ${{ secrets.CODECOV_TOKEN }}
89-
# collect_args: "--cli-api-key ${{ secrets.PROD_CLI_API_KEY }} --token ${{ secrets.CODEGEN_BOT_GHE_TOKEN }}"
90-
# ats_collect_args: "--cli-api-key=${{ secrets.PROD_CLI_API_KEY }},--token=${{ secrets.CODEGEN_BOT_GHE_TOKEN }},"
91-
# base_sha: ${{github.event_name == 'pull_request' && github.event.pull_request.base.sha || github.event.before}}
92-
# job_name: ${{ github.job }}
93-
# codecov_flags: smart-tests-verified-codemod-tests
94-
# env:
95-
# CODEGEN_BOT_GHE_TOKEN: ${{ secrets.CODEGEN_BOT_GHE_TOKEN }}
96-
# GITHUB_WORKSPACE: $GITHUB_WORKSPACE
97-
9868
parse-tests:
9969
runs-on: ubuntu-latest-32
10070
if: contains(github.event.pull_request.labels.*.name, 'parse-tests') || github.event_name == 'push' || github.event_name == 'workflow_dispatch'
@@ -160,54 +130,7 @@ jobs:
160130
}
161131
]
162132
}
163-
# test_codemod_diffs:
164-
# # changing the following value will significantly affect github's cost. Be careful and consult with the team before changing it.
165-
# runs-on: ubuntu-latest-16
166-
#
167-
# steps:
168-
# - uses: actions/checkout@v4
169-
# - name: Setup backend
170-
# uses: ./.github/actions/setup-backend
171-
# - name: Cache oss-repos
172-
# uses: ./.github/actions/setup-oss-repos
173-
# with:
174-
# CODEGEN_BOT_GHE_TOKEN: ${{ secrets.CODEGEN_BOT_GHE_TOKEN }}
175-
# - name: Test with pytest
176-
# timeout-minutes: 10
177-
# run: |
178-
# ENV=local \
179-
# uv run pytest \
180-
# -n auto \
181-
# -vv \
182-
# --token $CODEGEN_BOT_GHE_TOKEN \
183-
# tests/codemod/test_diffs.py
184-
# env:
185-
# CODEGEN_BOT_GHE_TOKEN: ${{ secrets.CODEGEN_BOT_GHE_TOKEN }}
186-
# GITHUB_WORKSPACE: $GITHUB_WORKSPACE
187-
#
188-
# - name: Publish Test Report (Verify diffs)
189-
# uses: mikepenz/action-junit-report@v4
190-
# if: (success() || failure()) # always publish report even if the tests fail
191-
# continue-on-error: true
192-
# with:
193-
# report_paths: "**/build/test-results/test/TEST.xml"
194-
# detailed_summary: true
195-
# annotate_only: true
196133
197-
# # Codecov is a required check but won't pass without a coverage report
198-
# # Wwhen there are no changes in the backend (ex: frontend only change) we do an empty upload to force the check to pass
199-
# - name: Upload empty coverage report to Codecov
200-
# if: env.skip == '0'
201-
# continue-on-error: true
202-
# env:
203-
# CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
204-
# run: |
205-
# cd codegen-backend
206-
# pip install codecov-cli
207-
# codecovcli create-commit -C ${{ github.event.pull_request.head.sha }}
208-
# codecovcli create-report -C ${{ github.event.pull_request.head.sha }}
209-
# codecovcli do-upload --disable-search --file empty_coverage.xml -C ${{ github.event.pull_request.head.sha }}
210-
# codecovcli empty-upload --force -C ${{ github.event.pull_request.head.sha }}
211134
integration-tests:
212135
runs-on: ubuntu-latest-16
213136
steps:

0 commit comments

Comments
 (0)