Count words #47
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
on: | |
push: | |
pull_request: | |
schedule: | |
- cron: "0 0 3 * *" | |
name: Count words | |
jobs: | |
count_words: | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- name: Set up Git repository | |
uses: actions/checkout@v2 | |
- name: Install texcount | |
run: sudo apt-get install texlive-extra-utils | |
- name: Count number of words | |
run: texcount article.tex | |
- name: Count number of words, allow 5004 | |
run: | | |
n_words=$(texcount article.tex | egrep "Words in text:.*" | cut -d ":" -f 2); if [ "$n_words" -gt 5004 ]; then print "ERROR: got $n_words words"; exit 42; fi |