Skip to content

refactor(docs): change docs to mkdocs #762

refactor(docs): change docs to mkdocs

refactor(docs): change docs to mkdocs #762

Workflow file for this run

name: Run all tests
on:
- push
- pull_request
jobs:
test-all-on-linux:
# This is our main test job, exercising everything and uploading to coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.8"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements/requirements.test.txt
pip install -e .
pip install pip-licenses
if pip-licenses | grep -v 'Artistic License' | grep -v LGPL | grep GNU; then echo 'Please avoid introducing *GPL dependencies'; false; fi
pip install coverage
- name: Ensure browser is installed
run: python -m playwright install --with-deps chromium
- name: Launch the API
run: |
coverage run --parallel-mode \
-m gunicorn --worker-class eventlet -w 1 g2p.app:APP --no-sendfile --bind 0.0.0.0:5000 --daemon
sleep 5
- name: Run dev suite
run: coverage run --parallel-mode run_tests.py dev
- name: Run test-studio
run: coverage run --parallel-mode g2p/tests/test_studio.py
- name: Post test analyses
run: |
pkill coverage
sleep 5
coverage combine
coverage xml
if git status | grep -E 'static.*json|mapping.*pkl|mapping.*langs.json.gz'; then echo 'g2p databases out of date, please run "g2p update" and commit the results.'; false; else echo OK; fi
- name: Upload coverage information
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false # too many upload errors to keep "true"
test-on-windows:
# Make sure stuff stays compatible with Windows by testing there too.
runs-on: windows-latest
if: ${{ !contains(github.event.head_commit.message, '#no-ci') }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # fetch all commits/branches
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.8"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .
- name: Install documentation dependencies
run: |
pip install -r docs/requirements.txt
- name: Run tests on Windows
run: python run_tests.py dev
- name: Make sure the CLI outputs utf8 on Windows
run: |
# Warning: This is PowerShell syntax, not bash!
g2p convert est fra fra-ipa > out
if (diff (echo ɛ) (cat out)) { throw "Output did not match reference" }
- name: Setup doc deploy
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
- name: Deploy docs with mike 🚀
run: |
mkdocs build
mike deploy --push --update-aliases latest