-
Notifications
You must be signed in to change notification settings - Fork 13
51 lines (43 loc) · 1.63 KB
/
ci.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
name: CI
on:
push:
pull_request:
jobs:
checks:
name: checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
persist-credentials: true
fetch-depth: 0
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Cache pip
uses: actions/cache@v2
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-pip-${{ hashFiles('**/requirements.txt') }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Convert text files to TSV and run TSV checks
run: |
echo "Push to branch ${{ github.head_ref || github.ref_name }}"
python txt_to_tsv.py
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "GitHub Actions"
echo "git status:"
git status
echo "git branch -r:"
git branch -r
echo "git remote -v:"
git remote -v
if [ $? -eq 0 ] && [ $(git status -s | wc -l) -gt 0 ]; then git add -A; git commit -m "Converted TXT to TSV"; git status; git push -u origin ${{ github.head_ref || github.ref_name }}; fi
- name: Create lexicon statistics table
run: |
python lexicon_statistics.py > ./lexicon_statistics.md
if [ $? -eq 0 ] && [ $(git status -s | wc -l) -gt 0 ]; then git add -A; git commit -m "Updated lexicon statistics table"; git push origin ${{ github.ref_name }}; fi