This repository has been archived by the owner on May 8, 2024. It is now read-only.
fix: repl. 'wiki_id' w/ 'swerik_id' #860
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: Perform unit tests | |
on: [push] | |
jobs: | |
schemas: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.8] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install . | |
pip install PyPDF2 | |
pip install dateparser | |
pip install nltk | |
- name: Validate XML files against ParlaClarin schema | |
run: | | |
python -m unittest test.schemas | |
unittest: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.8] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install . | |
pip install PyPDF2 | |
pip install dateparser | |
pip install alto-xml | |
pip install nltk | |
- name: Test data format and integrity | |
env: # authentication | |
KBLAB_USERNAME: ${{ secrets.KBLAB_USERNAME }} | |
KBLAB_PASSWORD: ${{ secrets.KBLAB_PASSWORD }} | |
run: | | |
python -m unittest test.mp | |
python -m unittest test.altocheck | |
python -m unittest test.next_prev | |
python -m unittest test.paragraph_has_id | |
python -m unittest test.chairs | |
metadata: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.8] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install . | |
pip install PyPDF2 | |
pip install dateparser | |
pip install alto-xml | |
pip install nltk | |
- name: Test metadata integrity | |
run: | | |
echo "Test that there are no duplicates in the DB" | |
echo "throw ERROR on inconsistencies on our side" | |
echo "WARN on upstream errors" | |
python -m unittest test.db | |
notebooks: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.8] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install . | |
- name: Test notebooks | |
run: | | |
pip install pytest nbmake | |
pytest --nbmake **/*ipynb | |
dynamic-readme: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.8] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install . | |
- name: Check that README updating script works | |
run: | | |
PYTHONPATH="$PYTHONPATH:." python scripts/stats-dashboard/generate-markdown.py -v v1.1.1 |