Skip to content

Commit 31aac42

Browse files
codegen-botahlincandrew-cgapkumarcaroljung-cg
authored andcommitted
Initial commit
Co-authored-by: Andrew Hlynskyi <ahlincq@gmail.com> Co-authored-by: Andrew Hlynskyi <andrew@codegen.com> Co-authored-by: Ankit Kumar <ankit@apkumar.com> Co-authored-by: Carol Jung <165736129+caroljung-cg@users.noreply.github.com> Co-authored-by: Chase McCarty <74570098+chase-mccarty@users.noreply.github.com> Co-authored-by: Chase McCarty <chasemc67@users.noreply.github.com> Co-authored-by: Christine Wang <christine@codegen.com> Co-authored-by: Christine Wang <christine@codegen.sh> Co-authored-by: Colin Fortuner <cfortuner@gmail.com> Co-authored-by: Edo Pujol <ed@codegen.sh> Co-authored-by: Edward-Codegen <163044658+Edward-Codegen@users.noreply.github.com> Co-authored-by: Ellen Agarwal <eagarwal@codegen.com> Co-authored-by: GitHub Actions <actions@github.com> Co-authored-by: James <james@codegen.sh> Co-authored-by: James Levy <james@codegen.sh> Co-authored-by: Jay <jay@codegen.sh> Co-authored-by: Jay Hack <jayhack@users.noreply.github.com> Co-authored-by: Joel Aguero <joelaguero@users.noreply.github.com> Co-authored-by: Joel Aguero <joelmaguero@gmail.com> Co-authored-by: Jon Hack <jayhack.0@gmail.com> Co-authored-by: Jon Hack <jonhack@Jons-MacBook-Pro.local> Co-authored-by: KopekC <k0p3k@riseup.net> Co-authored-by: Leo Cooperband <59453482+lcooperb@users.noreply.github.com> Co-authored-by: Leo Cooperband <lcooperband@gmail.com> Co-authored-by: Milan Poliak <milan.poliak@wize.sk> Co-authored-by: Noelle Jung <162620289+noellej03@users.noreply.github.com> Co-authored-by: Rishi Desai <rdesai@codegen.com> Co-authored-by: Rushil Patel <rpatel@codegen.com> Co-authored-by: Toni <toni@codegen.com> Co-authored-by: Toni García <133214663+agserrano3@users.noreply.github.com> Co-authored-by: Toni García Serrano <antonio.garciaserrano@birchbox.com> Co-authored-by: Vishal Shenoy <vishal.nshenoy@icloud.com> Co-authored-by: agserrano3 <133214663+agserrano3@users.noreply.github.com> Co-authored-by: agserrano3 <toni@codegen.sh> Co-authored-by: ahlinc <ahlinc@users.noreply.github.com> Co-authored-by: andrew-cg <176309405+andrew-cg@users.noreply.github.com> Co-authored-by: atemcodegen <158106535+atemcodegen@users.noreply.github.com> Co-authored-by: chase-mccarty <chase@codegen.sh> Co-authored-by: chasemc67 <chase@codegen.sh> Co-authored-by: christinewangcw <146775704+christinewangcw@users.noreply.github.com> Co-authored-by: christinewangcw <christine@codegen.com> Co-authored-by: christinewangcw <christine@codegen.sh> Co-authored-by: christinewangcw <christinewangcw@gmail.com> Co-authored-by: codegen-bot <team+codegenbot@codegen.sh> Co-authored-by: eacodegen <eagarwal@codegen.com> Co-authored-by: github-actions <github-actions@github.com> Co-authored-by: jamescodegen <146987962+jamescodegen@users.noreply.github.com> Co-authored-by: jayhack <jayhack.0@gmail.com> Co-authored-by: jemeza <57341979+jemeza@users.noreply.github.com> Co-authored-by: jemeza-codegen <165736868+jemeza-codegen@users.noreply.github.com> Co-authored-by: kopekC <ed@codegen.sh> Co-authored-by: milanpoliak <54911446+milanpoliak@users.noreply.github.com> Co-authored-by: noellej03 <162620289+noellej03@users.noreply.github.com> Co-authored-by: obeid96 <162928729+obeid96@users.noreply.github.com> Co-authored-by: ppillaycodegen <ppillay@codegen.com> Co-authored-by: rushilpatel0 <rpatel@codegen.com> Co-authored-by: sebastian-codegen <161637419+sebastian-codegen@users.noreply.github.com> Co-authored-by: tawsif-kamal-codegen <tkamal@codegen.com> Co-authored-by: tomcodgen <tkucar@codegen.com> Co-authored-by: trun-cg <tramteke@codegen.com>
0 parents  commit 31aac42

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)