-
Notifications
You must be signed in to change notification settings - Fork 208
34 lines (29 loc) · 1009 Bytes
/
run_tests_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
name: Run Tests
on:
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
# Checks the branch out under $GITHUB_WORKSPACE, so run_tests 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: Run unit tests with pytest
run: |
pytest tools/.