Merge branch 'main' of https://github.com/725921/nn #22
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: compute involvement degree | |
| # 触发条件:每次 push 代码时运行 | |
| on: [push] | |
| jobs: | |
| compute: | |
| # 使用矩阵策略,同时在 ubuntu 和 windows 上运行 | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest] # 添加 windows-latest | |
| # 运行环境 | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| # 1. 拉取完整 Git 历史(必须保留,否则无法统计所有提交和代码行数) | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| # 2. 设置 Python 环境 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.x' | |
| architecture: 'x64' | |
| # 3. 安装依赖 | |
| # 在 Windows 上 pip 命令相同,但 GitPython 在 Windows 下也能正常工作 | |
| - name: Install Python dependencies | |
| run: python -m pip install --upgrade pip requests gitpython | |
| # 4. 执行你的贡献统计脚本 | |
| - name: Display involvement degree (${{ matrix.os }}) | |
| run: python contribution_analysis.py -t ${{ secrets.GITHUB_TOKEN }} |