Add tests workflow #4
Workflow file for this run
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: Tests and Formatting | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| check-format: | |
| name: Check Format | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Run Ruff linter | |
| uses: astral-sh/ruff-action@v3 | |
| with: | |
| args: "check --output-format github src/" | |
| - name: Run Ruff formatter | |
| run: ruff format --check --diff | |
| tests: | |
| name: Run Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| version: "0.8.3" | |
| enable-cache: true | |
| - name: Run tests | |
| env: | |
| HF_TOKEN: ${{ secrets.HF_TOKEN }} | |
| run: | | |
| uv run huggingface-cli login --token ${{ inputs.HF_TOKEN }} > /dev/null 2>&1 | |
| make test | |
| continue-on-error: false |