Skip to content

cron

cron #813

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: cron
on:
workflow_dispatch:
schedule:
- cron: "05 06 */1 * *"
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cpu
- name: Download models
run: |
wget https://storage.googleapis.com/esun-ai/g2pW/G2PWModel-v2-onnx.zip
unzip G2PWModel-v2-onnx.zip
git lfs install
git clone https://huggingface.co/bert-base-chinese
- name: run demo file with stable
run: |
pip install pypinyin-g2pw
python tests/test_pinyin.py
- name: run demo file with master code
run: |
pip3 install .
python tests/test_pinyin.py
- name: Test with pytest
run: |
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
make test