andoriyaprashant / andoriyaprashant/OpSo
[Enhancement]: Add GitHub Actions CI workflow to run flutter analyze and flutter test on every PR
- 主要语言
- Dart
- 星标
- 53
- 派生
- 108
- PR 合并指标
- 30 天内没有已合并 PR
描述
## Summary
OpSo currently has a `.github/` directory but no automated CI workflow for pull requests. With 109 forks and multiple contributors actively submitting PRs, there is no automated check to ensure incoming code passes `flutter analyze` or does not break existing widget tests.
## Current State
- No `.github/workflows/` YAML file exists for CI.
- PRs are merged based purely on manual review.
- The `test/` directory exists in the repository, suggesting tests are expected — but they are never automatically run.
- The `.gradle/` directory and `local.properties` are committed, which suggests some platform-specific build state may be leaking into the repo.
## Impact
- Contributors have no automated feedback on whether their Dart code passes the linter before review.
- A PR that introduces an analysis warning or breaks a test can be merged silently.
- New contributors have no confidence their changes are correct before requesting a review.
## Proposed Solution
I would like to add a `.github/workflows/ci.yml` that runs the following on every PR and push to `main`:
```yaml
name: Flutter CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
analyze-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version: 'stable'
- name: Install dependencies
run: flutter pub get
- name: Run analyzer
run: flutter analyze
- name: Run tests
run: flutter test
```
Additionally, I would:
- Add `.gradle/` and `local.properties` to `.gitignore` if not already excluded.
- Add a CI status badge to the README.
This is a foundational quality-of-life improvement that benefits every future contributor. I would be happy to implement and raise a PR. Could you assign this to me?
**Labels:** `enhancement`, `ci/cd`, `infrastructure`, `help wanted`, `GSSoC 2026`
贡献指南
调研方向
Inspect the existing .github/ directory, test/ directory, .gitignore, and README.md first. Create the proposed .github/workflows/ci.yml, then verify the commands locally with flutter pub get, flutter analyze, and flutter test. Done means pull requests and pushes to main run analysis and tests automatically, with the requested repository cleanup and badge checked as applicable.
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- dart, flutter, github-actions
- 领域
- ci-cd, infrastructure
- Issue 类型
- 功能
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 冷清
- 描述清晰度
- 描述清楚
- 新手友好度
- 74/100