Bump nltk from 3.4.5 to 3.9 in /tools #1881
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: Validate Data | |
on: | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# Checks the branch out under $GITHUB_WORKSPACE, so validate_data can access it | |
# `git push` would fail on `fatal: You are not currently on a branch` if `ref` was | |
# not specified here. | |
# Inspired by: https://peterevans.dev/posts/github-actions-how-to-automate-code-formatting-in-pull-requests/ | |
- uses: actions/checkout@v2 | |
with: | |
ref: ${{ github.head_ref }} | |
token: ${{ secrets.UBERSHMEKEL_ALT_TOKEN }} | |
- name: Set up Python 3.7 | |
uses: actions/setup-python@v2 | |
with: | |
# Semantic version range syntax or exact version of a Python version | |
python-version: '3.7' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r tools/requirements.txt | |
python -c "import nltk; nltk.download('wordnet')" | |
- name: Rewrite data, generate ids, commit | |
run: | | |
echo github_ref: ${{ github.ref }} | |
python tools/data_rewriter.py | |
git add reports | |
git config --local user.email "action@github.com" | |
git config --local user.name "GitHub Action" | |
git remote set-url origin https://x-access-token:${{ secrets.UBERSHMEKEL_ALT_TOKEN }}@github.com/${{ github.repository }} | |
git commit -m "Automated data fixes" -a | exit 0 | |
git push | |
# Inspired by https://github.com/marketplace/actions/generate-documentation | |
# - name: Push changes | |
# uses: ad-m/github-push-action@master | |
# with: | |
# github_token: ${{ secrets.GITHUB_TOKEN }} |