Skip to content

Commit 517b188

Browse files
added missing files. updated path names
1 parent 2cbd28f commit 517b188

File tree

3 files changed

+21
-15
lines changed

3 files changed

+21
-15
lines changed

examples/codecov_agent_trigger/action.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ name: Backend Unit Tests
33
on:
44
push:
55
branches:
6-
- "develop"
6+
- "main"
77
pull_request:
88
branches:
9-
- "develop"
9+
- "main"
1010
workflow_dispatch:
1111

1212
jobs:
@@ -27,15 +27,15 @@ jobs:
2727
if: ${{ steps.setup.outputs.skip == 'false' }}
2828
timeout-minutes: 5
2929
run: |
30-
cd codegen-backend
30+
cd path/to/your/package
3131
ENV=staging \
3232
PYTHONPATH=. \
3333
uv run pytest \
3434
-n auto \
3535
-vv \
3636
--cov \
3737
--cov-report=xml \
38-
codegen_tests
38+
path/to/your/tests
3939
4040
- name: Publish Test Report (Unit tests)
4141
uses: mikepenz/action-junit-report@v4
@@ -53,7 +53,7 @@ jobs:
5353
uses: codecov/codecov-action@v4.5.0
5454
with:
5555
token: ${{ secrets.CODECOV_TOKEN }}
56-
file: codegen-backend/coverage.xml
56+
file: path/to/your/coverage.xml
5757
disable_search: true
5858
name: ${{ github.workflow }}
5959

@@ -65,5 +65,5 @@ jobs:
6565
REPO: ${{ github.repository }}
6666
TOKEN: ${{ secrets.CODEGEN_AGENT_TOKEN }}
6767
run: |
68-
cd codegen-backend
69-
uv run python scripts/process_coverage_report.py coverage.xml $PR_NUMBER $REPO $TOKEN
68+
cd path/to/your/package
69+
uv run python process_coverage_report.py coverage.xml $PR_NUMBER $REPO $TOKEN

examples/codecov_agent_trigger/generate_codecov_agent_prompt.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,13 @@ def generate_codecov_agent_prompt(pr_number, repo_name):
66
77
Please make sure to run the tests you add locally to ensure they are working.
88
9-
Please do not write tests for the following files:
10-
- codegen-backend/scripts/process_coverage_report.py
11-
- codegen-backend/scripts/generate_codecov_agent_prompt.py
12-
139
DO NOT COMMIT TESTS IF THEY ARE FAILING.
1410
15-
# Here are some commands you can use to run the tests:
11+
# Use these commands to run the tests:
1612
1713
# Install Python Dependencies
1814
```
19-
cd codegen-backend
15+
cd path/to/your/package
2016
uv venv
2117
source .venv/bin/activate
2218
uv pip install .
@@ -25,8 +21,8 @@ def generate_codecov_agent_prompt(pr_number, repo_name):
2521
2622
# Run Tests
2723
```
28-
chmod +x ./codegen-backend/scripts/codecov_agent_run_test.sh
29-
cd codegen-backend && ENV=develop ./codegen-backend/scripts/codecov_agent_run_test.sh <optional_test_file_path>
24+
chmod +x ./run_test.sh
25+
run_test.sh
3026
```
3127
3228
Good luck!
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#! /bin/bash
2+
3+
# Set environment variables
4+
export ENV_VAR_1=1
5+
export ENV_VAR_2=2
6+
export ENV_VAR_3=3
7+
8+
# Run the tests
9+
cd path/to/your/package
10+
pytest -v --cov=./path/to/your/tests --cov-report=xml:coverage.xml "$@"

0 commit comments

Comments
 (0)