~patch gitignore, add test action #1
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
| # This workflow will install Python dependencies, run tests and lint with a single version of Python | |
| # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
| name: metareader pytest | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python (with pip cache) | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.13" | |
| cache: "pip" | |
| - name: Create venv & install deps | |
| run: | | |
| python -m venv $HOME/.venv | |
| source $HOME/.venv/bin/activate | |
| python -m pip install --upgrade pip | |
| pip install --no-cache-dir ".[dev]" | |
| - name: Run tests | |
| env: | |
| HF_HOME: ${{ runner.temp }}/hf_cache | |
| run: | | |
| source $HOME/.venv/bin/activate | |
| cd tests | |
| pytest -v |