CoolFace
Apppublic

robinhad/ukrainian-tts

sourceHugging Faceupdated 1d agoView on Hugging Face
74likes
hf-sync.yml74 linesDownload Raw Back to workflows
1name: Pytest && Sync to Hugging Face hub2on:3  push:4    branches: [main]5 6  # to run this workflow manually from the Actions tab7  workflow_dispatch:8  schedule:9    - cron: '0 18 1 * *'10 11jobs:12  windows:13    name: Run pytest on Windows14    runs-on: windows-latest15    steps:16      - uses: actions/checkout@v117      - uses: actions/setup-python@v118        with:19          python-version: '3.10'20      - name: Test windows-latest binding21        run: |22          python -m venv venv323          venv3\Scripts\Activate.ps124          python -m pip install .25          python -m pip install -r requirements-test.txt26          python -m pytest27 28  build:29    name: Run pytest and checks30    runs-on: ubuntu-latest31    #strategy:32    #  matrix:33    #    python-version: ["3.7", "3.8", "3.9", "3.10"]34 35    steps:36      - uses: actions/checkout@v337      - name: Set up Python 3.10 #${{ matrix.python-version }}38        uses: actions/setup-python@v439        with:40          python-version: '3.10' #${{ matrix.python-version }}41      - name: Install libsndfile142        run: sudo apt-get update && sudo apt-get install -y libsndfile143      - name: Install dependencies44        run: |45          python -m pip install --upgrade pip46          pip install -r requirements-test.txt47      - name: Check code with black48        run: |49           black --check .50      #- name: Lint with flake851      #  run: |52      #    # stop the build if there are Python syntax errors or undefined names53      #    flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics54      #    # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide55      #    flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics56      - name: Install dependencies57        run: |58          python -m pip install --upgrade pip59          pip install -r requirements.txt60      - name: Test with pytest61        run: |62          pytest63  sync-to-hub:64    runs-on: ubuntu-latest65    needs: [build,windows]66    steps:67      - uses: actions/checkout@v268        with:69          fetch-depth: 070      - name: Push to hub71        env:72          HF_TOKEN: ${{ secrets.HF_TOKEN }}73        run: git push -f https://robinhad:$HF_TOKEN@huggingface.co/spaces/robinhad/ukrainian-tts main74