Allow token mismatch (#126) #47
This file contains hidden or 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: Run Tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - '*' | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| test: | |
| name: Run Tests | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Python 3.9 | |
| uses: actions/setup-python@v3 | |
| with: | |
| python-version: '3.9' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e .[dev] | |
| pip install huggingface_hub | |
| - name: Save Hugging Face API Token | |
| run: | | |
| python -c "from huggingface_hub.hf_api import HfFolder; HfFolder.save_token('${{ secrets.HF_API_TOKEN }}')" | |
| - name: Run tests | |
| run: | | |
| pytest tests/ |