Skip to content

Commit fbcbfc6

Browse files
codegen-botahlincandrew-cgapkumarcaroljung-cg
authored andcommitted
Initial commit
Co-authored-by: Andrew Hlynskyi <[email protected]> Co-authored-by: Andrew Hlynskyi <[email protected]> Co-authored-by: Ankit Kumar <[email protected]> Co-authored-by: Carol Jung <[email protected]> Co-authored-by: Chase McCarty <[email protected]> Co-authored-by: Chase McCarty <[email protected]> Co-authored-by: Christine Wang <[email protected]> Co-authored-by: Christine Wang <[email protected]> Co-authored-by: Colin Fortuner <[email protected]> Co-authored-by: Edo Pujol <[email protected]> Co-authored-by: Edward-Codegen <[email protected]> Co-authored-by: Edward-Codegen <[email protected]> Co-authored-by: Ellen Agarwal <[email protected]> Co-authored-by: GitHub Actions <[email protected]> Co-authored-by: James <[email protected]> Co-authored-by: James Levy <[email protected]> Co-authored-by: Jay <[email protected]> Co-authored-by: Jay Hack <[email protected]> Co-authored-by: Joel Aguero <[email protected]> Co-authored-by: Joel Aguero <[email protected]> Co-authored-by: Jon Hack <[email protected]> Co-authored-by: Jon Hack <[email protected]> Co-authored-by: KopekC <[email protected]> Co-authored-by: Leo Cooperband <[email protected]> Co-authored-by: Leo Cooperband <[email protected]> Co-authored-by: Milan Poliak <[email protected]> Co-authored-by: Noelle Jung <[email protected]> Co-authored-by: Rishi Desai <[email protected]> Co-authored-by: Rushil Patel <[email protected]> Co-authored-by: Toni <[email protected]> Co-authored-by: Toni García <[email protected]> Co-authored-by: Toni García Serrano <[email protected]> Co-authored-by: Vishal Shenoy <[email protected]> Co-authored-by: agserrano3 <[email protected]> Co-authored-by: agserrano3 <[email protected]> Co-authored-by: ahlinc <[email protected]> Co-authored-by: andrew-cg <[email protected]> Co-authored-by: atemcodegen <[email protected]> Co-authored-by: chase-mccarty <[email protected]> Co-authored-by: chasemc67 <[email protected]> Co-authored-by: christinewangcw <[email protected]> Co-authored-by: christinewangcw <[email protected]> Co-authored-by: christinewangcw <[email protected]> Co-authored-by: christinewangcw <[email protected]> Co-authored-by: codegen-bot <[email protected]> Co-authored-by: eacodegen <[email protected]> Co-authored-by: github-actions <[email protected]> Co-authored-by: jamescodegen <[email protected]> Co-authored-by: jayhack <[email protected]> Co-authored-by: jemeza <[email protected]> Co-authored-by: jemeza-codegen <[email protected]> Co-authored-by: kopekC <[email protected]> Co-authored-by: milanpoliak <[email protected]> Co-authored-by: noellej03 <[email protected]> Co-authored-by: obeid96 <[email protected]> Co-authored-by: ppillaycodegen <[email protected]> Co-authored-by: rushilpatel0 <[email protected]> Co-authored-by: sebastian-codegen <[email protected]> Co-authored-by: tawsif-kamal-codegen <[email protected]> Co-authored-by: tomcodgen <[email protected]> Co-authored-by: trun-cg <[email protected]>
0 parents  commit fbcbfc6

File tree

1,171 files changed

+142528
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,171 files changed

+142528
-0
lines changed

.circleci/ats.sh

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/usr/bin/env bash
2+
if ! command -v jq &> /dev/null; then
3+
apt update
4+
apt install jq -y
5+
fi
6+
export PATH=$PATH:$HOME/.local/bin
7+
echo "Git fetch"
8+
git fetch
9+
echo "Creating commit"
10+
uv run --frozen codecovcli create-commit -t ${CODECOV_TOKEN}
11+
echo "Creating report"
12+
uv run --frozen codecovcli create-report -t ${CODECOV_TOKEN}
13+
echo "Running static analysis"
14+
uv run --frozen codecovcli static-analysis --token ${CODECOV_STATIC_TOKEN} --folders-to-exclude .venv
15+
ATS_COLLECT_ARGS="${ATS_COLLECT_ARGS}${DEFAULT_TESTS},"
16+
echo "Label analysis with base sha: ${BASE_SHA} and default tests: ${ATS_COLLECT_ARGS}"
17+
runner_param="collect_tests_options=${ATS_COLLECT_ARGS}"
18+
response=$(uv run --frozen codecovcli label-analysis --token ${CODECOV_STATIC_TOKEN} --base-sha=$BASE_SHA --dry-run --dry-run-format="json" --runner-param "$runner_param")
19+
mkdir codecov_ats
20+
jq <<< "$response" '.runner_options + .ats_tests_to_run | .[1:] | map(gsub("\""; "")) | join(" ")' --raw-output > codecov_ats/tests_to_run.txt
21+
jq <<< "$response" '.runner_options + .ats_tests_to_skip | .[1:] | map(gsub("\""; "")) | join(" ")' --raw-output > codecov_ats/tests_to_skip.txt
22+
testcount() { jq <<< "$response" ".$1 | length - 1"; }
23+
run_count=$(testcount ats_tests_to_run)
24+
skip_count=$(testcount ats_tests_to_skip)
25+
echo "Run count: $run_count"
26+
echo "Skip count: $skip_count"
27+
if [ ! -s codecov_ats/tests_to_run.txt ]; then
28+
echo "No tests to run, collecting from default tests"
29+
PYTEST_ARGS="${COLLECT_ARGS} ${DEFAULT_TESTS}"
30+
echo "Using args: ${PYTEST_ARGS}"
31+
TESTS_TO_RUN=$(PYTEST_ARGS=${PYTEST_ARGS} ./.circleci/collect.sh)
32+
echo "${TESTS_TO_RUN}" > codecov_ats/tests_to_run.txt
33+
run_count=1
34+
echo "Added ${TESTS_TO_RUN} as fallback. New run count: $run_count"
35+
fi
36+

.circleci/collect.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env bash
2+
TESTS_TO_RUN=$(uv run --frozen pytest --collect-only ${PYTEST_ARGS} -q --disable-warnings --no-summary --no-header)
3+
TESTS_TO_RUN=$(echo "${TESTS_TO_RUN}" | head -n -2)
4+
echo $TESTS_TO_RUN

0 commit comments

Comments
 (0)