Skip to content

Make hooks seedable and added instance-level properties #1386

Make hooks seedable and added instance-level properties

Make hooks seedable and added instance-level properties #1386

Workflow file for this run

name: Testing
on: # yamllint disable-line rule:truthy
push:
branches:
- main
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
pytest:
env:
UV_CACHE_DIR: /tmp/.uv-cache
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up python
id: setup-python
uses: actions/setup-python@v5
with:
python-version-file: ".python-version"
- name: Set up uv
run: curl -LsSf https://astral.sh/uv/${{ env.UV_VERSION }}/install.sh | sh
- name: Restore uv cache
uses: actions/cache@v4
with:
path: /tmp/.uv-cache
key: uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
restore-keys: |
uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
uv-${{ runner.os }}
- name: Install dependencies
run: uv sync --all-extras --dev --frozen
- name: Test non-gpu tests with pytest
run: uv run pytest test/unit -m "not gpu" --cov=tgm --cov-report=xml --cov-append -vvv
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
files: ./coverage.xml
flags: non-gpu
name: codecov-${{ github.event_name }}
token: ${{ secrets.CODECOV_TOKEN }}
- name: Minimize uv cache
run: uv cache prune --ci