Skip to content

Commit a2c9093

Browse files
committed
ci : add env based matrix tests
for `edu-base` containers for `-test-` containers
1 parent a86f8c2 commit a2c9093

File tree

1 file changed

+62
-2
lines changed

1 file changed

+62
-2
lines changed

.github/workflows/build.yml

Lines changed: 62 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
- name: Verify that the Docker image for the action builds
4242
run: docker build . --file Dockerfile
4343

44-
integration-tests:
44+
integration-tests-action:
4545
needs: build
4646
runs-on: ubuntu-latest
4747
strategy:
@@ -90,7 +90,67 @@ jobs:
9090
- name: Verify integration test results
9191
run: |
9292
. .venv/bin/activate
93-
uv pip list
93+
uv pip list
94+
echo "feedback_${{ matrix.model }}=${{ steps.integration.outputs.feedback }}" >> $GITHUB_OUTPUT
95+
python3 -u -m pytest tests/integration.py
96+
97+
integration-tests-env:
98+
needs: build
99+
runs-on: ubuntu-latest
100+
strategy:
101+
matrix:
102+
include:
103+
- model: gemini-2.5-flash
104+
secret: GOOGLE_API_KEY
105+
- model: grok-code-fast
106+
secret: XAI_API_KEY
107+
- model: claude-sonnet-4-20250514
108+
secret: CLAUDE_API_KEY
109+
- model: google/gemma-2-9b-it
110+
secret: NVIDIA_NIM_API_KEY
111+
- model: sonar
112+
secret: PERPLEXITY_API_KEY
113+
fail-fast: false
114+
steps:
115+
- uses: actions/checkout@v5
116+
117+
- name: Install uv package manager
118+
uses: astral-sh/setup-uv@v6
119+
with:
120+
version: "latest"
121+
version-file: "pyproject.toml"
122+
python-version: 3.11
123+
enable-cache: true
124+
125+
- run: uv sync
126+
127+
- name: Integration test ${{ matrix.model }}
128+
id: integration
129+
env:
130+
INPUT_REPORT-FILES: tests/sample_report.json,tests/json_dict_div_zero_try_except.json
131+
INPUT_STUDENT-FILES: tests/sample_code.py
132+
INPUT_README-PATH: tests/sample_readme.md
133+
INPUT_CLAUDE_API_KEY: ${{ secrets.CLAUDE_API_KEY }}
134+
INPUT_GEMINI-API-KEY: ${{ secrets.GOOGLE_API_KEY }}
135+
INPUT_GROK-API-KEY: ${{ secrets.XAI_API_KEY }}
136+
INPUT_NVIDIA-API-KEY: ${{ secrets.NVIDIA_NIM_API_KEY }}
137+
INPUT_PERPLEXITY-API-KEY: ${{ secrets.PERPLEXITY_API_KEY }}
138+
INPUT_MODEL: ${{ matrix.model }}
139+
explanation-in: Korean
140+
fail-expected: True
141+
run: |
142+
. .venv/bin/activate
143+
uv pip list
144+
python3 entrypoint.py
145+
timeout-minutes: 5
146+
- name: Output and Verify
147+
run: |
148+
echo "${{ matrix.model }} ${{ steps.integration.outputs.feedback }}"
149+
echo "feedback_${{ matrix.model }}=${{ steps.integration.outputs.feedback }}" >> $GITHUB_OUTPUT
150+
- name: Verify integration test results
151+
run: |
152+
. .venv/bin/activate
153+
uv pip list
94154
echo "feedback_${{ matrix.model }}=${{ steps.integration.outputs.feedback }}" >> $GITHUB_OUTPUT
95155
python3 -u -m pytest tests/integration.py
96156

0 commit comments

Comments
 (0)