Skip to content

Add test job to CI/CD pipeline before build#267

Merged
ImChong merged 1 commit into
mainfrom
claude/confident-dirac-281ynp
Jun 12, 2026
Merged

Add test job to CI/CD pipeline before build#267
ImChong merged 1 commit into
mainfrom
claude/confident-dirac-281ynp

Conversation

@ImChong

@ImChong ImChong commented Jun 12, 2026

Copy link
Copy Markdown
Owner

Summary

This PR adds a dedicated test job to the GitHub Actions deployment workflow that runs before the build job, ensuring code quality and test coverage are validated before building artifacts.

Key Changes

  • Added a new test job that runs on Ubuntu latest
  • Configured Python 3.12 environment setup
  • Installed development dependencies from requirements-dev.txt
  • Added Ruff linting checks for scripts/ and tests/ directories
  • Added Pytest test execution with verbose output
  • Updated the build job to depend on the test job completing successfully

Implementation Details

The test job is configured to run before the build job using the needs: test dependency, ensuring that:

  • Code passes linting checks (Ruff)
  • All tests pass (Pytest)
  • Build only proceeds if tests succeed

This improves CI/CD reliability by catching issues early in the pipeline.

https://claude.ai/code/session_019G2U7w3opLofVqRV1iP6Q6

deploy.yml 与 ci.yml 此前各自独立触发,lint/测试失败的代码仍会部署到
GitHub Pages。新增 test 作业(ruff + pytest),build 依赖其通过后才执行。
@ImChong ImChong merged commit 669ac8c into main Jun 12, 2026
1 check passed
@ImChong ImChong deleted the claude/confident-dirac-281ynp branch June 12, 2026 05:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants