Create codingagent.yaml#14
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a GitHub Actions workflow file for continuous integration testing across Python and Node.js components. The workflow runs on pushes to main and agent branches, as well as on pull requests targeting main.
Key Changes:
- Adds parallel CI jobs for Python (pytest with coverage) and Node.js (ESLint)
- Implements a status tracking mechanism using
.agent/statusfiles to detect failures - Includes an aggregation job that checks overall CI health
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| - name: Run tests | ||
| run: | | ||
| pytest -q --maxfail=1 --disable-warnings --cov=simulator || echo "PYTEST_FAILED" > .agent/status |
There was a problem hiding this comment.
The .agent/status file is created when pytest fails, but this file is not uploaded as an artifact and won't be accessible in the aggregate job. The aggregate job runs on a fresh runner without access to files created in the python or node jobs. Consider using job outputs or artifact uploads to track failure status across jobs.
|
|
||
| - name: Lint | ||
| run: | | ||
| if [ -f package.json ]; then npx eslint . || echo "ESLINT_FAILED" > .agent/status; fi |
There was a problem hiding this comment.
Similar to the pytest job, the .agent/status file created here won't be accessible in the aggregate job since each job runs in an isolated environment. The status tracking mechanism will not work as intended.
|
|
||
| - name: Aggregate status | ||
| run: | | ||
| if [ -f .agent/status ]; then |
There was a problem hiding this comment.
This check will never find the .agent/status file because it's checking in a fresh runner environment that doesn't have access to files created in the python or node jobs. The aggregate job will always pass even when previous jobs fail. Use needs: [python, node] with if: failure() condition or check ${{ needs.python.result }} and ${{ needs.node.result }} instead.
| if [ -f .agent/status ]; then | |
| if [[ "${{ needs.python.result }}" != "success" || "${{ needs.node.result }}" != "success" ]]; then |
|
|
||
| - name: Run tests | ||
| run: | | ||
| pytest -q --maxfail=1 --disable-warnings --cov=simulator || echo "PYTEST_FAILED" > .agent/status |
There was a problem hiding this comment.
Using || echo to suppress pytest failure prevents the job from failing when tests fail. This masks test failures and the job will report success even when tests don't pass. Remove the || echo portion to let the job fail naturally, or use continue-on-error: true at the step level if you want the workflow to continue.
|
|
||
| - name: Lint | ||
| run: | | ||
| if [ -f package.json ]; then npx eslint . || echo "ESLINT_FAILED" > .agent/status; fi |
There was a problem hiding this comment.
Using || echo suppresses the ESLint failure, preventing the job from failing when linting errors occur. This will cause the job to report success even when linting fails. Remove the || echo portion or use continue-on-error: true at the step level.
| if [ -f package.json ]; then npx eslint . || echo "ESLINT_FAILED" > .agent/status; fi | |
| if [ -f package.json ]; then npx eslint .; fi |
No description provided.