-
Notifications
You must be signed in to change notification settings - Fork 5
64 lines (54 loc) · 1.85 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
on:
schedule:
- cron: '0 2 * * *'
push:
jobs:
mathlib_stats:
if: github.event.pusher.name != 'leanprover-community-bot'
runs-on: ubuntu-latest
name: Generate statistics about the mathlib repo
steps:
- name: Checkout scripts
uses: actions/checkout@v2
- name: Checkout mathlib
run: git clone https://github.com/leanprover-community/mathlib
- name: Checkout mathlib4
run: git clone https://github.com/leanprover-community/mathlib4
- name: Checkout mathlib-mailmap
uses: actions/checkout@v2
with:
# this repo is private to prevent spambots from scraping email addresses
repository: leanprover-community/mathlib-mailmap
token: ${{ secrets.MAILMAP_GITHUB_TOKEN }}
path: mailmap
- name: install Python
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Run gitstats
run: |
cp mailmap/mailmap mathlib/.mailmap
cp mailmap/mailmap mathlib4/.mailmap
./gitstats.py mathlib docs
./gitstats.py mathlib4 docs4
cp docs4/gitstats.js docs/gitstats4.js
# - name: Install gnuplot
# run: |
# sudo apt-get update --fix-missing
# sudo apt-get install gnuplot
# - name: Make nolints graph
# run: |
# bash nolint_graph.sh > nolint_graph_out.txt
# cut -f2 -d: nolint_graph_out.txt > rev_stats.txt
# gnuplot plot.gnu
- name: push results
# push results when we push to master
if: github.repository == 'leanprover-community/mathlib_stats' && github.ref == 'refs/heads/master'
uses: EndBug/add-and-commit@v4
with:
add: 'docs'
author_name: 'leanprover-community-bot'
author_email: 'leanprover.community@gmail.com'
message: 'Update gitstats'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}