Skip to content

Collect stats

Collect stats #6097

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Collect stats
on:
push:
branches: [ master ]
# Don't activate until pushing has been disabled for PRs
#pull_requests:
# branches: [ master ]
schedule:
- cron: '0 */6 * * *'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
run: pip install poetry
- name: Install dependencies
run: poetry install
- name: Collect and append stats
run: |
poetry run python3 collect_stats.py --csv >> data/stats.csv
# This has started causing "rate-limit exceeded", breaking CI.
# TODO: Needs to be done smarter.
#poetry run python3 collect_stats.py --releases --csv > data/releases.csv
- name: Commit
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add data/*.csv
git commit -m "chore: update stats"
- name: Push changes
uses: ad-m/github-push-action@fe38f0a751bf9149f0270cc1fe20bf9156854365
with:
github_token: ${{ secrets.GITHUB_TOKEN }}