Skip to content

2.0.0b5

2.0.0b5 #1023

Workflow file for this run

# This workflow will run the tests for the awpy Python library
name: build
on:
pull_request:
branches: [main]
paths:
- "awpy/**"
- "tests/**"
- "pyproject.toml"
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.10", "3.11", "3.12"]
timeout-minutes: 15
steps:
- name: Checkout awpy library
uses: actions/checkout@v4
- name: Cache test demos
id: cache-demos
uses: actions/cache@v4
env:
cache-name: cache-demos
with:
# demos are downloaded to and looked for in `{repo}/tests`
path: ${{ github.workspace }}/tests/*.dem
# Invalidate the cache if the file containing the demo urls has changed.
key: cache-test-demos-${{ hashFiles('**/test_data.json') }}
# Care with this: If a demo changes but the name remains the same
# then this could cause issues. So do not do that!
restore-keys: cache-test-demos-
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Set up Python
run: |
uv python install ${{ matrix.python-version }}
- name: Install awpy
shell: bash
run: |
uv sync --group dev --group test
uv tool install .
- name: Formatting + Lint
shell: bash
run: |
uv run ruff check . --fix --exit-zero
uv run ruff check .
- name: Test
shell: bash
run: |
uv run awpy get tri
uv run coverage run -m pytest --durations=10
uv run coverage report -m