XML Rule Statistics #238
This file contains 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: XML Rule Statistics | |
on: | |
schedule: | |
- cron: '0 3 * * *' | |
jobs: | |
compile-stats: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: "Set up Python 3.7" | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.7" | |
- name: 'Checkout LT OS repo' | |
uses: actions/checkout@v3 | |
with: | |
repository: languagetool-org/languagetool | |
path: repos-latest/languagetool | |
token: ${{ secrets.LT_OS_TOKEN }} | |
- name: 'Checkout LT Premium repo' | |
uses: actions/checkout@v3 | |
with: | |
repository: languagetooler-gmbh/languagetool-premium-modules | |
path: repos-latest/languagetool-premium-modules | |
token: ${{ secrets.LT_PREMIUM_TOKEN }} | |
- name: 'Checkout LT OS repo (start of quarter)' | |
uses: actions/checkout@v3 | |
with: | |
repository: languagetool-org/languagetool | |
path: repos-quarter-start/languagetool | |
token: ${{ secrets.LT_OS_TOKEN }} | |
ref: ${{ vars.QUARTER_TAG }} | |
- name: 'Checkout LT Premium repo (start of quarter)' | |
uses: actions/checkout@v3 | |
with: | |
repository: languagetooler-gmbh/languagetool-premium-modules | |
path: repos-quarter-start/languagetool-premium-modules | |
token: ${{ secrets.LT_PREMIUM_TOKEN }} | |
ref: ${{ vars.QUARTER_TAG }} | |
- name: Install dependencies | |
run: pip install -r requirements.txt | |
- name: Run dump script on latest data | |
run: | | |
python ./scripts/dump_all.py './repos-latest' --out-dir 'rule-dump-latest' | |
- name: Compare repo states | |
run: | | |
python ./scripts/compare.py --from-dir 'repos-quarter-start' --to-dir 'repos-latest' --out-dir 'added-rules' | |
- name: Generate master CSV | |
run: | | |
python ./scripts/master_csv.py './repos-latest' --out-dir 'master-csv' | |
- name: Compile style stats | |
run: | | |
python ./scripts/style_stats.py --from-dir 'repos-quarter-start' --to-dir 'repos-latest' --out-dir 'style-stats' | |
- name: Run cross language applicability script on latest data | |
run: | | |
python ./scripts/cross_ling_appl.py --to-dir './repos-latest' --out-dir 'all_style_comments' | |
- name: Archive dump artefacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: rule-dump-latest | |
path: rule-dump-latest/ | |
- name: Archive comparison artefacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: added-rules | |
path: added-rules/ | |
- name: Archive master CSV | |
uses: actions/upload-artifact@v3 | |
with: | |
name: all_rules | |
path: master-csv/all_rules.csv | |
- name: Archive style stats | |
uses: actions/upload-artifact@v3 | |
with: | |
name: style_stats | |
path: style-stats/ | |
- name: Archive style comments | |
uses: actions/upload-artifact@v3 | |
with: | |
name: all_style_comments | |
path: all_style_comments/ |