Run dataset tests on Woodpecker with full data access #81
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: Evaluation tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - future/* | |
| - series/* | |
| pull_request: | |
| concurrency: | |
| group: eval-${{github.ref}} | |
| cancel-in-progress: true | |
| jobs: | |
| eval-tests: | |
| name: Evaluation-based tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: π Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: jdx/mise-action@v4 | |
| with: | |
| install: false | |
| - name: πΆοΈ Install uv | |
| uses: astral-sh/setup-uv@v8.0.0 | |
| with: | |
| python-version: "3.12.5" | |
| activate-environment: true | |
| cache-suffix: "-20260407" | |
| - name: π¦ Set up Python dependencies (Unix) | |
| if: runner.os != 'Windows' | |
| run: | | |
| uv sync --all-extras --no-default-groups --group test | |
| env: | |
| DONT_SET_MARCH: 1 | |
| - name: Cache ML data | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| data | |
| key: eval-test-data | |
| - name: Download datasets | |
| run: | | |
| lenskit data fetch -D data --movielens ml-100k ml-1m ml-10m | |
| lenskit data fetch -D data/az23 --amazon --core Video_Games | |
| lenskit data fetch -D data/az18 --amazon --edition 2018 Video_Games | |
| lenskit data fetch -D data/az14 --amazon --edition 2014 Video_Games | |
| lenskit data fetch --ms-web | |
| if [[ ! -f data/australian_users_items.json.gz ]]; then | |
| curl -fsL -o data/australian_users_items.json.gz.tmp https://mcauleylab.ucsd.edu/public_datasets/data/steam/australian_users_items.json.gz | |
| mv data/australian_users_items.json.gz.tmp data/australian_users_items.json.gz | |
| fi | |
| - name: Run Eval Tests | |
| run: | | |
| pytest --cov-append --cov=src/lenskit --durations=10 -m 'eval or realdata' --log-file test-eval.log tests | |
| - name: π€ Upload coverage to CodeCov | |
| uses: codecov/codecov-action@v7.0.0 | |
| cli-tests: | |
| name: Command-line interface tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: π Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Cache ML data | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| data | |
| key: cli-test-data | |
| - uses: jdx/mise-action@v4 | |
| with: | |
| install: false | |
| - name: πΆοΈ Install uv | |
| uses: astral-sh/setup-uv@v8.0.0 | |
| with: | |
| python-version: "3.12.5" | |
| activate-environment: true | |
| cache-suffix: "-20260407" | |
| - name: π¦ Set up Python dependencies | |
| run: | | |
| uv sync --all-extras --no-default-groups --group test | |
| env: | |
| DONT_SET_MARCH: 1 | |
| - name: Download datasets | |
| run: | | |
| coverage run -a --source=src/lenskit -m lenskit data fetch -D data --movielens ml-100k ml-20m ml-1m ml-10m | |
| coverage run -a --source=src/lenskit -m lenskit data fetch -D data/az23 --amazon --core Video_Games | |
| coverage run -a --source=src/lenskit -m lenskit data fetch -D data/az18 --amazon --edition 2018 Video_Games | |
| coverage run -a --source=src/lenskit -m lenskit data fetch -D data/az14 --amazon --edition 2014 Video_Games | |
| coverage run -a --source=src/lenskit -m lenskit data fetch --ms-web | |
| if [[ ! -f data/australian_users_items.json.gz ]]; then | |
| curl -fsL -o data/australian_users_items.json.gz.tmp https://mcauleylab.ucsd.edu/public_datasets/data/steam/australian_users_items.json.gz | |
| mv data/australian_users_items.json.gz.tmp data/australian_users_items.json.gz | |
| fi | |
| - name: πΊπ» Test LensKit CLI | |
| run: | | |
| mise run test-cli -- --coverage --cov-append | |
| shell: bash -e {0} | |
| env: | |
| LK_TUNE_JOBS: 2 | |
| - name: πΊπ» Test LensKit tune CLI (with Ray) | |
| run: | | |
| mise run test-cli -- --coverage --cov-append tests/cli/test-tune.sh | |
| shell: bash -e {0} | |
| env: | |
| LK_USE_RAY_TUNE: 1 | |
| - name: π€ Upload coverage to CodeCov | |
| uses: codecov/codecov-action@v7.0.0 |